summaryrefslogtreecommitdiff
path: root/lib/irb/command/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/command/base.rb')
-rw-r--r--lib/irb/command/base.rb23
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/irb/command/base.rb b/lib/irb/command/base.rb
index ff74b5fb35..1d406630a2 100644
--- a/lib/irb/command/base.rb
+++ b/lib/irb/command/base.rb
@@ -18,12 +18,12 @@ module IRB
class << self
def category(category = nil)
@category = category if category
- @category
+ @category || "No category"
end
def description(description = nil)
@description = description if description
- @description
+ @description || "No description provided."
end
def help_message(help_message = nil)
@@ -50,25 +50,6 @@ module IRB
attr_reader :irb_context
- def unwrap_string_literal(str)
- return if str.empty?
-
- sexp = Ripper.sexp(str)
- if sexp && sexp.size == 2 && sexp.last&.first&.first == :string_literal
- @irb_context.workspace.binding.eval(str).to_s
- else
- str
- end
- end
-
- def ruby_args(arg)
- # Use throw and catch to handle arg that includes `;`
- # For example: "1, kw: (2; 3); 4" will be parsed to [[1], { kw: 3 }]
- catch(:EXTRACT_RUBY_ARGS) do
- @irb_context.workspace.binding.eval "IRB::Command.extract_ruby_args #{arg}"
- end || [[], {}]
- end
-
def execute(arg)
#nop
end