From 9c06f9eca16b20e7426a1b141c97b94b0f2c3965 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 11 Oct 2023 17:14:32 -0700 Subject: [PATCH] Fix calling exit if irb_context is nil (#727) --- lib/irb/extend-command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb index 514293a43..cce7f8a4a 100644 --- a/lib/irb/extend-command.rb +++ b/lib/irb/extend-command.rb @@ -22,7 +22,7 @@ module ExtendCommandBundle # # Same as IRB.CurrentContext.exit. def irb_exit(ret = 0) - irb_context.exit(ret) + irb_context&.exit(ret) end # Displays current configuration.