summaryrefslogtreecommitdiff
path: root/lib/irb/context.rb
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-06-28 05:43:48 +0900
committergit <svn-admin@ruby-lang.org>2023-06-27 20:43:53 +0000
commit8aedfefb21bb44fb043f29692e807033d26dfda5 (patch)
treec062280095b9b141dc069e572537d71cb55a4793 /lib/irb/context.rb
parentcaddd0274b6c859ab4a55ae033c4bc69c85a0fa9 (diff)
[ruby/irb] Remove keyword exception from Context#evaluate because
the value is always nil (https://github.com/ruby/irb/pull/617) https://github.com/ruby/irb/commit/62691384f8
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r--lib/irb/context.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb
index 22059d74d5..58964aa832 100644
--- a/lib/irb/context.rb
+++ b/lib/irb/context.rb
@@ -473,15 +473,8 @@ module IRB
@inspect_mode
end
- def evaluate(line, line_no, exception: nil) # :nodoc:
+ def evaluate(line, line_no) # :nodoc:
@line_no = line_no
-
- if exception
- line_no -= 1
- line = "begin ::Kernel.raise _; rescue _.class\n#{line}\n""end"
- @workspace.local_variable_set(:_, exception)
- end
-
set_last_value(@workspace.evaluate(line, irb_path, line_no))
end