8000 New Ruby 2.1, 2.2, 2.3 Syntax by korny · Pull Request #189 · rubychan/coderay · GitHub
[go: up one dir, main page]

Skip to content

New Ruby 2.1, 2.2, 2.3 Syntax #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 13, 2016
Prev Previous commit
Next Next commit
add support for Ruby 2.3 safe navigation operator
  • Loading branch information
korny committed Feb 13, 2016
commit d9d1eedcb235b371683eed22a6e4217caef73ffa
2 changes: 1 addition & 1 deletion lib/coderay/scanners/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def scan_tokens encoder, options
end
value_expected = false

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

Expand Down
0