ruby-changes:55909
From: Nobuyoshi <ko1@a...>
Date: Wed, 29 May 2019 22:13:22 +0900 (JST)
Subject: [ruby-changes:55909] Nobuyoshi Nakada: 12644e8b02 (trunk): Get rid of nested string interpolations
https://git.ruby-lang.org/ruby.git/commit/?id=12644e8b02 From 12644e8b0208b01f4f4cea550d161a86e6f25aa8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> 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 diff --git a/lib/irb/color.rb b/lib/irb/color.rb index 71557ff..caa7f50 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -94,7 +94,8 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/color.rb#L94 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/