From 12644e8b0208b01f4f4cea550d161a86e6f25aa8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 29 May 2019 21:59:34 +0900 Subject: Get rid of nested string interpolations * lib/irb/color.rb (IRB::Color.colorize): get rid of nesting string interpolations not to confuse ruby-mode.el --- lib/irb/color.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/irb/color.rb') diff --git a/lib/irb/color.rb b/lib/irb/color.rb index 71557ffbb9..caa7f5032a 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -94,7 +94,8 @@ module IRB # :nodoc: def colorize(text, seq) return text unless colorable? - "#{seq.map { |s| "\e[#{const_get(s)}m" }.join('')}#{text}#{clear}" + seq = seq.map { |s| "\e[#{const_get(s)}m" }.join('') + "#{seq}#{text}#{clear}" end def scan(code) -- cgit v1.2.3