diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-06-04 00:22:22 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-06-04 00:26:02 +0900 |
commit | de541fe1961370e64541d73c96cf790d30f28604 (patch) | |
tree | e0dff25bcc3c45dd846d2375c25a405cb36ca812 /lib/irb/color.rb | |
parent | 6498c733da4f34aca47ca88412605761467a2fec (diff) |
colorize_code must return escaped text
This was needed before 0c459af7c233adb5f44022350bfe8fa132d8053e but it
could be actually useless now. But I added this anyway just in case.
Diffstat (limited to 'lib/irb/color.rb')
-rw-r--r-- | lib/irb/color.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb index c2d0084446..4996ccf92f 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -123,7 +123,9 @@ module IRB # :nodoc: end # give up colorizing incomplete Ripper tokens - return code if length != code.bytesize + if length != code.bytesize + return Reline::Unicode.escape_for_print(code) + end colored end |