diff options
author | Stan Lo <stan001212@gmail.com> | 2023-04-08 11:11:46 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-04-08 10:11:50 +0000 |
commit | e7f77e1e8979047b3ec2944d0aea7511282715d0 (patch) | |
tree | febf255b217370e8d774c0911ea41a0e35928673 /defs | |
parent | 08324ab9eb97535b5994450186c5048be3c0cd62 (diff) | |
download | ruby-e7f77e1e8979047b3ec2944d0aea7511282715d0.tar.gz |
[ruby/irb] Simplify command method definition
(https://github.com/ruby/irb/pull/559)
* Remove unnecessary command argument generation code
Now that all the supported Ruby versions handle splat args and splat kwargs,
we don't need that args generation code anymore.
* Remove unused command definition code
If we look at `@EXTEND_COMMANDS`, all commands are defined in a file, which
means the `if load_file` branch is always executed. Therefore we can drop
the else branch of that condition.
* Avoid defining unnecessary command methods
There's no need to define another command method just to call `Command.execute`.
Diffstat (limited to 'defs')
0 files changed, 0 insertions, 0 deletions