summaryrefslogtreecommitdiff
path: root/lib/irb/extend-command.rb
diff options
context:
space:
mode:
authorIgnacio Chiazzo Cardarello <ignaciochiazzo@gmail.com>2024-02-10 19:07:48 -0300
committergit <svn-admin@ruby-lang.org>2024-02-10 22:07:53 +0000
commit429eeb09f25bd1bd3f64f70c6ef409bedd3c6c1f (patch)
treeeb2d72bf3bb9c063cf6bf4e7ac0c6a4f77db098b /lib/irb/extend-command.rb
parentf960fbc10256ee227ad6887089388e0bda59aab5 (diff)
[ruby/irb] Introduce exit! command
(https://github.com/ruby/irb/pull/851) * Added failing test for when writing history on exit * Save history on exit * Exit early when calling Kernel.exit * use status 0 for kernel.exit * Added test for nested sessions * Update lib/irb.rb --------- https://github.com/ruby/irb/commit/c0a5f31679 Co-authored-by: Stan Lo <stan001212@gmail.com>
Diffstat (limited to 'lib/irb/extend-command.rb')
-rw-r--r--lib/irb/extend-command.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb
index 91ca96e91a..2db2b80578 100644
--- a/lib/irb/extend-command.rb
+++ b/lib/irb/extend-command.rb
@@ -37,6 +37,11 @@ module IRB # :nodoc:
[:irb_quit, OVERRIDE_PRIVATE_ONLY],
],
[
+ :irb_exit!, :ExitForcedAction, "cmd/exit_forced_action",
+ [:exit!, OVERRIDE_PRIVATE_ONLY],
+ ],
+
+ [
:irb_current_working_workspace, :CurrentWorkingWorkspace, "cmd/chws",
[:cwws, NO_OVERRIDE],
[:pwws, NO_OVERRIDE],