summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 2b3c85a..579fd67 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)