Skip to content

Commit

Permalink
Get rid of nested string interpolations
Browse files Browse the repository at this point in the history
* lib/irb/color.rb (IRB::Color.colorize): get rid of nesting string
  interpolations not to confuse ruby-mode.el
  • Loading branch information
nobu committed May 29, 2019
1 parent 1da5c73 commit 12644e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/irb/color.rb
Expand Up @@ -94,7 +94,8 @@ def clear

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)
Expand Down

0 comments on commit 12644e8

Please sign in to comment.