From 0d919d07f67166981cea476e1febbc40af2eae9c Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 24 Mar 2006 21:58:29 +0000 Subject: Ruby Scanner: Capital methods (Kernel#Array etc.) are now highlighted as idents. Tests adjusted. highlight.rb updated. --- lib/coderay/scanners/ruby.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay/scanners/ruby.rb') 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] -- cgit v1.2.1