Skip to content

Commit

Permalink
Simply dump strings to escape
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and tenderlove committed Dec 5, 2023
1 parent 0442307 commit f1ba900
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/thor/parser/argument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ def initialize(name, options = {})

def print_default
if @type == :array and @default.is_a?(Array)
@default.map { |x|
p = x.gsub('"','\\"')
"\"#{p}\""
}.join(" ")
@default.map(&:dump).join(" ")
else
@default
end
Expand Down

0 comments on commit f1ba900

Please sign in to comment.