aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/command
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2024-04-21 02:55:51 +0800
committergit <svn-admin@ruby-lang.org>2024-04-20 18:55:54 +0000
commitf16c6ac4fdbc619ba2f9d3dd7cd3b06c736aa589 (patch)
tree65ef479031e21b6f9741053c99e51fdd09ae3709 /lib/irb/command
parent2b11bcb84ec0e9326ce03a2ec8f0ed2ee349d3c1 (diff)
downloadruby-f16c6ac4fdbc619ba2f9d3dd7cd3b06c736aa589.tar.gz
[ruby/irb] Stop using ExtendCommandBundle internally
(https://github.com/ruby/irb/pull/925) This module was used to extend both commands and helpers when they're not separated. Now that they are, and we have a Command module, we should move command-related logic to the Command module and update related references. This will make the code easier to understand and refactor in the future. https://github.com/ruby/irb/commit/f74ec97236
Diffstat (limited to 'lib/irb/command')
-rw-r--r--lib/irb/command/help.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/command/help.rb b/lib/irb/command/help.rb
index c9f16e05bc..fc44f6080e 100644
--- a/lib/irb/command/help.rb
+++ b/lib/irb/command/help.rb
@@ -11,7 +11,7 @@ module IRB
if command_name.empty?
help_message
else
- if command_class = ExtendCommandBundle.load_command(command_name)
+ if command_class = Command.load_command(command_name)
command_class.help_message || command_class.description
else
"Can't find command `#{command_name}`. Please check the command name and try again.\n\n"
@@ -23,7 +23,7 @@ module IRB
private
def help_message
- commands_info = IRB::ExtendCommandBundle.all_commands_info
+ commands_info = IRB::Command.all_commands_info
commands_grouped_by_categories = commands_info.group_by { |cmd| cmd[:category] }
user_aliases = irb_context.instance_variable_get(:@user_aliases)