ruby-changes:63690
From: aycabta <ko1@a...>
Date: Sun, 22 Nov 2020 21:00:33 +0900 (JST)
Subject: [ruby-changes:63690] 2d112c346a (master): [ruby/irb] Stop using bang version for #inspect of result
https://git.ruby-lang.org/ruby.git/commit/?id=2d112c346a From 2d112c346a7a1369af1236928538a3b3a833f781 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 11 Nov 2020 00:05:33 +0900 Subject: [ruby/irb] Stop using bang version for #inspect of result https://github.com/ruby/irb/commit/fc1426d34e 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 https://github.com/ruby/ruby/blob/trunk/lib/irb.rb#L761 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/