summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-02-13 12:08:21 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2016-02-13 12:08:21 +0100
commitd9d1eedcb235b371683eed22a6e4217caef73ffa (patch)
treec82f536e07ab72b0da29847771d5aa8503854ab7
parent39cbd37815f65f21e0433f4da4cf5fbeda2e1e3f (diff)
downloadcoderay-d9d1eedcb235b371683eed22a6e4217caef73ffa.tar.gz
add support for Ruby 2.3 safe navigation operator
-rw-r--r--lib/coderay/scanners/ruby.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 165d66b..24ab71f 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -201,7 +201,7 @@ module Scanners
end
value_expected = false
- elsif match = scan(/ [-+!~^\/]=? | [:;] | [*|&]{1,2}=? | >>? /x)
+ elsif match = scan(/ [-+!~^\/]=? | [:;] | &\. | [*|&]{1,2}=? | >>? /x)
value_expected = true
encoder.text_token match, :operator