Skip to content

Commit d9d1eed

Browse files
committed
add support for Ruby 2.3 safe navigation operator
1 parent 39cbd37 commit d9d1eed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/ruby.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def scan_tokens encoder, options
201201
end
202202
value_expected = false
203203

204-
elsif match = scan(/ [-+!~^\/]=? | [:;] | [*|&]{1,2}=? | >>? /x)
204+
elsif match = scan(/ [-+!~^\/]=? | [:;] | &\. | [*|&]{1,2}=? | >>? /x)
205205
value_expected = true
206206
encoder.text_token match, :operator
207207

0 commit comments

Comments
 (0)