lib/cliutils/pretty_io.rb in cliutils-2.0.0 vs lib/cliutils/pretty_io.rb in cliutils-2.0.1

- old
+ new

@@ -58,12 +58,12 @@ def _word_wrap(text, prefix_str) if PrettyIO.wrap return text if PrettyIO.wrap_char_limit <= 0 limit = PrettyIO.wrap_char_limit - prefix_str.length - text.gsub(/\n/, ' ') - .gsub(/(.{1,#{ limit }})(\s+|$)/, "#{ prefix_str }\\1\n") - .strip + text.to_s.gsub(/\n/, ' ') + .gsub(/(.{1,#{ limit }})(\s+|$)/, "#{ prefix_str }\\1\n") + .strip else text end end end