summaryrefslogtreecommitdiff
path: root/lib/coderay
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay')
-rw-r--r--lib/coderay/scanners/ruby.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 8952422..dd92caf 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -188,10 +188,10 @@ module CodeRay module Scanners
# IDENTS #
if match = scan(/#{METHOD_NAME}/o)
if last_token_dot
- type = if match[/^[A-Z]/] then :constant else :ident end
+ type = if match[/^[A-Z]/] and not match?(/\(/) then :constant else :ident end
else
type = IDENT_KIND[match]
- if type == :ident and match[/^[A-Z]/] and not match[/[!?]$/]
+ if type == :ident and match[/^[A-Z]/] and not match[/[!?]$/] and not match?(/\(/)
type = :constant
elsif type == :reserved
state = DEF_NEW_STATE[match]