summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-02-18 11:34:23 +0000
committergit <svn-admin@ruby-lang.org>2023-02-18 11:34:28 +0000
commitcbac0fa4cb43c8ec35683e3ae848d5fb8143c757 (patch)
treef08f3d97cc7bdaea01550c94c8a84ba94317a931 /lib/irb
parentde7eb5e79ae9ff6425c51eb74d0e9c3f33f9edfe (diff)
[ruby/irb] Remove unused context argument from Worksapce#evaluate
(https://github.com/ruby/irb/pull/488) The context argument was introduced in this change: https://github.com/ruby/irb/commit/6806669d178f90f38b99c144bdfee06bdb93a229#diff-296327851fb7a2c307c2d0693b769f58c01aaf315972f290500d10081ee200a9 perhaps for potential usages. But after that it's never used.
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/context.rb2
-rw-r--r--lib/irb/ext/history.rb4
-rw-r--r--lib/irb/ext/tracer.rb4
-rw-r--r--lib/irb/workspace.rb2
4 files changed, 6 insertions, 6 deletions
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