From 47c2210555e565bd0895e563275db0e263a59258 Mon Sep 17 00:00:00 2001 From: tompng Date: Mon, 1 Apr 2024 22:05:36 +0900 Subject: [PATCH] Remove command arg unquote in help command --- lib/irb/command/help.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/irb/command/help.rb b/lib/irb/command/help.rb index 5298d3047..fac8074a2 100644 --- a/lib/irb/command/help.rb +++ b/lib/irb/command/help.rb @@ -6,18 +6,17 @@ class Help < Base category "Help" description "List all available commands. Use `help ` to get information about a specific command." - def execute(arg) + def execute(command_name) # Accept string literal for backward compatibility - command_name = unwrap_string_literal(arg) content = - if command_name + if command_name.empty? + help_message + else if command_class = ExtendCommandBundle.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" end - else - help_message end Pager.page_content(content) end