diff options
author | Lee Jarvis <leejarvis@fastmail.com> | 2021-05-11 14:06:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 14:06:10 +0100 |
commit | 42e3a360c30bf89407403b1ce9ab4dd93b6f5514 (patch) | |
tree | 964d6c4fc37660f7ea6005013c515ef6bdfa4394 | |
parent | 90c53c0959712a2254d88765dfdbe9de06ac543e (diff) | |
parent | 8c5fd1b57790223f9c5e167147564992adc3dad6 (diff) | |
download | slop-42e3a360c30bf89407403b1ce9ab4dd93b6f5514.tar.gz |
Merge pull request #255 from MadBomber/madbomber_frozen_string_exception_fix
changed str << to str +=
-rwxr-xr-x[-rw-r--r--] | lib/slop/options.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/slop/options.rb b/lib/slop/options.rb index 875fcfe..17e9501 100644..100755 --- a/lib/slop/options.rb +++ b/lib/slop/options.rb @@ -105,14 +105,14 @@ module Slop 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 |