ruby/lib/irb/command/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
257 B
Ruby

# frozen_string_literal: true
module IRB
# :stopdoc:
module Command
class Exit < Base
category "IRB"
description "Exit the current irb session."
def execute(_arg)
IRB.irb_exit
end
end
end
# :startdoc:
end