From 896626fa02f00831de5db2e3e75aa349a5a84102 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 6 Oct 2021 08:55:29 -0700 Subject: [ruby/irb] Make IRB::Context#exit call super if UncaughtThrowError Fixes calling exit after binding.irb. Fixes [Bug #18234] https://github.com/ruby/irb/commit/4ea8d376f2 --- lib/irb/context.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/irb/context.rb') diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 09fd840bd3..698378cc62 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -478,6 +478,8 @@ module IRB # Exits the current session, see IRB.irb_exit def exit(ret = 0) IRB.irb_exit(@irb, ret) + rescue UncaughtThrowError + super end NOPRINTING_IVARS = ["@last_value"] # :nodoc: -- cgit v1.2.3