Skip to content

Commit

Permalink
Merge pull request #255 from MadBomber/madbomber_frozen_string_except…
Browse files Browse the repository at this point in the history
…ion_fix

changed str << to str +=
  • Loading branch information
leejarvis authored May 11, 2021
2 parents 90c53c0 + 8c5fd1b commit 42e3a36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/slop/options.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ def to_s(prefix: " " * 4)
options.select.each_with_index.sort_by{ |o,i| [o.tail, i] }.each do |opt, i|
# use the index to fetch an associated separator
if sep = separators[i]
str << "#{sep}\n"
str += "#{sep}\n"
end

str << "#{prefix}#{opt.to_s(offset: len)}\n" if opt.help?
str += "#{prefix}#{opt.to_s(offset: len)}\n" if opt.help?
end

if sep = separators[options.size]
str << "#{sep}\n"
str += "#{sep}\n"
end

str
Expand Down

0 comments on commit 42e3a36

Please sign in to comment.