diff options
author | tomoya ishida <[email protected]> | 2024-04-11 01:52:47 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-04-10 16:52:53 +0000 |
commit | 6a505d1b59cf326a8e004fc06e02f30222b17f3f (patch) | |
tree | 8ed520d1aee744158f154f4dd7733b6eb4d017e0 /lib/irb/context.rb | |
parent | 9f6deaa6888a423720b4b127b5314f0ad26cc2e6 (diff) |
[ruby/irb] Command implementation not by method
(https://github.com/ruby/irb/pull/824)
* Command is not a method
* Fix command test
* Implement non-method command name completion
* Add test for ExtendCommandBundle.def_extend_command
* Add helper method install test
* Remove spaces in command input parse
* Remove command arg unquote in help command
* Simplify Statement and handle execution in IRB::Irb
* Tweak require, const name
* Always install CommandBundle module to main object
* Remove considering local variable in command or expression check
* Remove unused method, tweak
* Remove outdated comment for help command arg
Co-authored-by: Stan Lo <[email protected]>
---------
https://github.com/ruby/irb/commit/8fb776e379
Co-authored-by: Stan Lo <[email protected]>
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r-- | lib/irb/context.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 60dfb9668d..e3c4192459 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -646,17 +646,5 @@ module IRB def local_variables # :nodoc: workspace.binding.local_variables end - - # Return true if it's aliased from the argument and it's not an identifier. - def symbol_alias?(command) - return nil if command.match?(/\A\w+\z/) - command_aliases.key?(command.to_sym) - end - - # Return true if the command supports transforming args - def transform_args?(command) - command = command_aliases.fetch(command.to_sym, command) - ExtendCommandBundle.load_command(command)&.respond_to?(:transform_args) - end end end |