diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 21:59:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 21:59:34 +0900 |
commit | 12644e8b0208b01f4f4cea550d161a86e6f25aa8 (patch) | |
tree | e82cafb8071b31b8b56fba38143991e36c9127e5 /lib/irb/color.rb | |
parent | 1da5c73932b2dcf2a089f125df1fe7cc4ab9fafd (diff) | |
download | ruby-12644e8b0208b01f4f4cea550d161a86e6f25aa8.tar.gz |
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
Diffstat (limited to 'lib/irb/color.rb')
-rw-r--r-- | lib/irb/color.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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) |