Skip to content

Commit f1d8d5a

Browse files
authored
Accomodate new prism token (#1232)
Changed in ruby/prism#4199. Other token changes are irrelevant since they are already not used.
1 parent ffaf5f1 commit f1d8d5a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/irb/color.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ module Color
9999
REGEXP_BEGIN: [RED, BOLD],
100100
REGEXP_END: [RED, BOLD],
101101
STRING_BEGIN: [RED, BOLD],
102+
XSTRING_BEGIN: [RED, BOLD],
102103
STRING_CONTENT: [RED],
103104
STRING_END: [RED, BOLD],
104105
__END__: [GREEN],

‎test/irb/test_color.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def test_colorize_code
101101
"foo %i[bar]" => "#{CYAN}foo#{CLEAR} #{YELLOW}%i[#{CLEAR}#{YELLOW}bar#{CLEAR}#{YELLOW}]#{CLEAR}",
102102
"foo :@bar, baz, :@@qux, :$quux" => "#{CYAN}foo#{CLEAR} #{YELLOW}:#{CLEAR}#{YELLOW}@bar#{CLEAR}, #{CYAN}baz#{CLEAR}, #{YELLOW}:#{CLEAR}#{YELLOW}@@qux#{CLEAR}, #{YELLOW}:#{CLEAR}#{YELLOW}$quux#{CLEAR}",
103103
"`echo`" => "#{RED}#{BOLD}`#{CLEAR}#{RED}echo#{CLEAR}#{RED}#{BOLD}`#{CLEAR}",
104+
"foo.`(bar)" => "#{CYAN}foo#{CLEAR}.#{CYAN}`#{CLEAR}(#{CYAN}bar#{CLEAR})",
104105
"\t" => Reline::Unicode.escape_for_print("\t") == ' ' ? ' ' : "\t", # not ^I
105106
"foo(*%W(bar))" => "#{CYAN}foo#{CLEAR}(*#{RED}#{BOLD}%W(#{CLEAR}#{RED}bar#{CLEAR}#{RED}#{BOLD})#{CLEAR})",
106107
"$stdout" => "#{GREEN}#{BOLD}$stdout#{CLEAR}",

0 commit comments

Comments
 (0)