diff --git a/lib/irb/context.rb b/lib/irb/context.rb index a8031d0294..f398c6f75d 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -494,7 +494,7 @@ module IRB line = "#{command} #{command_class.transform_args(args)}" end - set_last_value(@workspace.evaluate(self, line, irb_path, line_no)) + set_last_value(@workspace.evaluate(line, irb_path, line_no)) end def inspect_last_value # :nodoc: diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb index 59aa9cb0c7..5243504efa 100644 --- a/lib/irb/ext/history.rb +++ b/lib/irb/ext/history.rb @@ -18,7 +18,7 @@ module IRB # :nodoc: if defined?(@eval_history) && @eval_history @eval_history_values.push @line_no, @last_value - @workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}" + @workspace.evaluate "__ = IRB.CurrentContext.instance_eval{@eval_history_values}" end @last_value @@ -49,7 +49,7 @@ module IRB # :nodoc: else @eval_history_values = History.new(no) IRB.conf[:__TMP__EHV__] = @eval_history_values - @workspace.evaluate(self, "__ = IRB.conf[:__TMP__EHV__]") + @workspace.evaluate("__ = IRB.conf[:__TMP__EHV__]") IRB.conf.delete(:__TMP_EHV__) end else diff --git a/lib/irb/ext/tracer.rb b/lib/irb/ext/tracer.rb index 56beb0a1dd..2d20cd3821 100644 --- a/lib/irb/ext/tracer.rb +++ b/lib/irb/ext/tracer.rb @@ -65,12 +65,12 @@ module IRB if context.use_tracer? && file != nil && line != nil Tracer.on begin - __evaluate__(context, statements, file, line) + __evaluate__(statements, file, line) ensure Tracer.off end else - __evaluate__(context, statements, file || __FILE__, line || __LINE__) + __evaluate__(statements, file || __FILE__, line || __LINE__) end end end diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb index 5f990940e8..30a3e5f20e 100644 --- a/lib/irb/workspace.rb +++ b/lib/irb/workspace.rb @@ -109,7 +109,7 @@ EOF attr_reader :main # Evaluate the given +statements+ within the context of this workspace. - def evaluate(context, statements, file = __FILE__, line = __LINE__) + def evaluate(statements, file = __FILE__, line = __LINE__) eval(statements, @binding, file, line) end