From 802302678209833b411cbb014a50d2524b1f3b03 Mon Sep 17 00:00:00 2001 From: SamW Date: Tue, 18 Nov 2025 15:38:13 -0800 Subject: [PATCH] [lib/irb] Explicitly join on "" so $, does not change error message outputs --- lib/irb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb.rb b/lib/irb.rb index c76c3f569..d71a1b5f0 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -430,7 +430,7 @@ def handle_exception(exc) end end lines = lines.reverse if order == :bottom - lines.map{ |l| l + "\n" }.join + lines.map{ |l| l + "\n" }.join('') } # The "" in "(irb)" may be the top level of IRB so imitate the main object. message = message.gsub(/\(irb\):(?\d+):in (?[`'])<(?top \(required\))>'/) { "(irb):#{$~[:num]}:in #{$~[:open_quote]}
'" }