diff --git a/lib/iruby/backend.rb b/lib/iruby/backend.rb index 9711aa1..967de39 100644 --- a/lib/iruby/backend.rb +++ b/lib/iruby/backend.rb @@ -57,7 +57,7 @@ def eval_binding end def eval(code, store_history) - @irb.context.evaluate(code, 0) + @irb.context.evaluate(@irb.build_statement(code), 0) @irb.context.last_value unless IRuby.silent_assignment && assignment_expression?(code) end