ruby/lib/irb/cmd
Stan Lo 4bdfc9070c [ruby/irb] Refactor exit command
(https://github.com/ruby/irb/pull/835)

* Remove unnecessary code from the exit command's implementation

1. The parameters of `IRB.irb_exit` were never used. But there are some
   libraries seem to call it with arguments + it's declared on the top-level
   IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
   the `@irb` instance it passes. And since it's (or should be treated as)
   a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
   But to avoid raising errors on usages like `exit 1`, I changed the argument to
   anonymous splat instead removing it.

* Make exit an actual command

* Update readme

452b543a65
2024-01-06 17:15:16 +00:00
..
backtrace.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
break.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
catch.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
chws.rb [ruby/irb] Add workspace category 2023-08-01 12:51:30 +00:00
continue.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
debug.rb [ruby/irb] Debugging command warning should not be specific to the 2023-12-07 16:09:15 +00:00
delete.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
edit.rb [ruby/irb] Support VISUAL env var, and prefer it over EDITOR 2023-08-20 17:22:01 +00:00
exit.rb [ruby/irb] Refactor exit command 2024-01-06 17:15:16 +00:00
finish.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
help.rb [ruby/irb] Print deprecation warning for help command 2023-05-18 03:28:31 +00:00
history.rb [ruby/irb] Implement history command 2023-12-02 04:32:04 +00:00
info.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
irb_info.rb [ruby/irb] Type based completion using Prism and RBS 2023-11-08 02:46:33 +00:00
load.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
ls.rb [ruby/irb] Page ls's output (https://github.com/ruby/irb/pull/657) 2023-07-26 08:32:02 +00:00
measure.rb [ruby/irb] Warn and do nothing if block is passed to measure command 2023-12-13 11:06:26 +00:00
next.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00
nop.rb [ruby/irb] Refactor ExtendCommand::Nop 2023-06-05 19:12:16 +00:00
pushws.rb [ruby/irb] Add workspace category 2023-08-01 12:51:30 +00:00
show_cmds.rb [ruby/irb] Display aliases in help message 2023-11-26 17:07:45 +00:00
show_doc.rb [ruby/irb] Print deprecation warning for help command 2023-05-18 03:28:31 +00:00
show_source.rb [ruby/irb] Simplify show_source's super calculation 2023-12-10 04:21:46 +00:00
step.rb [ruby/irb] Fix step command (https://github.com/ruby/irb/pull/477) 2022-12-09 23:39:17 +00:00
subirb.rb [ruby/irb] Support seamless integration with ruby/debug 2023-08-13 18:30:34 +00:00
whereami.rb [ruby/irb] Add "show_cmds" command to list all commands' 2022-12-08 19:10:23 +00:00