mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] shortcut colorize_code to speedup pretty_print
https://github.com/ruby/irb/commit/8a074a6904
This commit is contained in:
parent
4406cb1bf1
commit
b54f26b704
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ module IRB
|
|||
width ||= str.length
|
||||
|
||||
case str
|
||||
when ''
|
||||
when ',', '=>', '[', ']', '{', '}', '..', '...', /\A@\w+\z/
|
||||
super(str, width)
|
||||
when /\A#</, '=', '>'
|
||||
super(Color.colorize(str, [:GREEN]), width)
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue