lib/code/node/boolean.rb in code-ruby-0.5.6 vs lib/code/node/boolean.rb in code-ruby-0.6.0

- old
+ new

@@ -1,21 +1,23 @@ +# frozen_string_literal: true + class Code class Node class Boolean < Node TRUE_KEYWORD = "true" FALSE_KEYWORD = "false" def initialize(parsed) @boolean = parsed end - def evaluate(**args) + def evaluate(**_args) if @boolean == TRUE_KEYWORD ::Code::Object::Boolean.new(true) elsif @boolean == FALSE_KEYWORD ::Code::Object::Boolean.new(false) else - raise NotImplementedError.new(@boolean) + raise NotImplementedError, @boolean end end end end end