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.