diff options
-rw-r--r-- | lib/irb.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index 2b3c85a348..579fd67c67 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -761,7 +761,7 @@ module IRB str = "%s...\e[0m" % lines.first multiline_p = false else - str.gsub!(/(\A.*?\n).*/m, "\\1...") + str = str.gsub(/(\A.*?\n).*/m, "\\1...") end else output_width = Reline::Unicode.calculate_width(@context.return_format % str, true) |