ruby/lib/irb/command/force_exit.rb
tomoya ishida 125e1ed5f7 [ruby/irb] Remove exit command workaround, handle IRB_EXIT in
debug_readline
(https://github.com/ruby/irb/pull/923)

* Remove exit and exti! command workaround when executed outside of IRB

Command was a method. It could be executed outside of IRB.
Workaround for it is no longer needed.

* Handle IRB_EXIT in debug mode

* Add exit and exit! command in rdbg mode

0b5dd6afd0
2024-04-20 07:45:41 +00:00

18 lines
267 B
Ruby

# frozen_string_literal: true
module IRB
# :stopdoc:
module Command
class ForceExit < Base
category "IRB"
description "Exit the current process."
def execute(_arg)
throw :IRB_EXIT, true
end
end
end
# :startdoc:
end