File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ module Color
41
41
on_embvar : [ [ RED ] , ALL ] ,
42
42
on_float : [ [ MAGENTA , BOLD ] , ALL ] ,
43
43
on_gvar : [ [ GREEN , BOLD ] , ALL ] ,
44
+ on_backref : [ [ GREEN , BOLD ] , ALL ] ,
44
45
on_heredoc_beg : [ [ RED ] , ALL ] ,
45
46
on_heredoc_end : [ [ RED ] , ALL ] ,
46
47
on_ident : [ [ BLUE , BOLD ] , Ripper ::EXPR_ENDFN ] ,
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ def test_colorize_code
102
102
"\t " => Reline ::Unicode . escape_for_print ( "\t " ) == ' ' ? ' ' : "\t " , # not ^I
103
103
"foo(*%W(bar))" => "foo(*#{ RED } #{ BOLD } %W(#{ CLEAR } #{ RED } bar#{ CLEAR } #{ RED } #{ BOLD } )#{ CLEAR } )" ,
104
104
"$stdout" => "#{ GREEN } #{ BOLD } $stdout#{ CLEAR } " ,
105
+ "$&" => "#{ GREEN } #{ BOLD } $&#{ CLEAR } " ,
105
106
"__END__" => "#{ GREEN } __END__#{ CLEAR } " ,
106
107
"foo\n __END__\n bar" => "foo\n #{ GREEN } __END__#{ CLEAR } \n bar" ,
107
108
"foo\n <<A\0 \0 bar\n A\n baz" => "foo\n #{ RED } <<A#{ CLEAR } ^@^@bar\n #{ RED } A#{ CLEAR } \n baz" ,
@@ -136,7 +137,7 @@ def test_colorize_code
136
137
"[1]]]\u0013 " => "[#{ BLUE } #{ BOLD } 1#{ CLEAR } ]#{ RED } #{ REVERSE } ]#{ CLEAR } ]^S" ,
137
138
"def req(true) end" => "#{ GREEN } def#{ CLEAR } #{ BLUE } #{ BOLD } req#{ CLEAR } (#{ RED } #{ REVERSE } true#{ CLEAR } ) end" ,
138
139
"nil = 1" => "#{ CYAN } #{ BOLD } nil#{ CLEAR } = #{ BLUE } #{ BOLD } 1#{ CLEAR } " ,
139
- "alias $x $1" => "#{ GREEN } alias#{ CLEAR } #{ GREEN } #{ BOLD } $x#{ CLEAR } $1 " ,
140
+ "alias $x $1" => "#{ GREEN } alias#{ CLEAR } #{ GREEN } #{ BOLD } $x#{ CLEAR } #{ GREEN } #{ BOLD } $1 #{ CLEAR } " ,
140
141
"class bad; end" => "#{ GREEN } class#{ CLEAR } bad; #{ GREEN } end#{ CLEAR } " ,
141
142
"def req(@a) end" => "#{ GREEN } def#{ CLEAR } #{ BLUE } #{ BOLD } req#{ CLEAR } (@a) #{ GREEN } end#{ CLEAR } " ,
142
143
} )
You can’t perform that action at this time.
0 commit comments