summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-11-11 00:05:33 +0900
committeraycabta <aycabta@gmail.com>2020-11-22 21:00:11 +0900
commit2d112c346a7a1369af1236928538a3b3a833f781 (patch)
tree56e352522a5679b23baa296a16e0de46a28525e1
parentafb8aba4af923350cfe0a0ae4b4895d5a837e799 (diff)
[ruby/irb] Stop using bang version for #inspect of result
https://github.com/ruby/irb/commit/fc1426d34e
-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)