[前][次][番号順一覧][スレッド一覧]

ruby-changes:68298

From: Jeremy <ko1@a...>
Date: Thu, 7 Oct 2021 23:54:10 +0900 (JST)
Subject: [ruby-changes:68298] 896626fa02 (master): [ruby/irb] Make IRB::Context#exit call super if UncaughtThrowError

https://git.ruby-lang.org/ruby.git/commit/?id=896626fa02

From 896626fa02f00831de5db2e3e75aa349a5a84102 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
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(+)

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 https://github.com/ruby/ruby/blob/trunk/lib/irb/context.rb#L478
     # 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.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]