diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-02-17 17:51:20 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-02-17 17:51:20 +0100 |
commit | d87cdc14fed39d0d18fa289cddaaba67253bf4ca (patch) | |
tree | 0ab5b1ffaec2c087775dc8760d45b03554a69ab9 /lib/coderay/scanners | |
parent | 7f664a608f902a2e1623b9e066386599c741e202 (diff) | |
parent | aa01f05af6cc59f9b23a717c730326841e335d9f (diff) | |
download | coderay-d87cdc14fed39d0d18fa289cddaaba67253bf4ca.tar.gz |
Merge branch 'fix-ruby-unicode' into fix-ruby-new-hash-syntax
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index 2069e36..ed071d2 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -34,9 +34,9 @@ module Scanners add(%w[ undef ], :undef_expected). add(%w[ alias ], :alias_expected). add(%w[ class module ], :module_expected) - - IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? /[[:alpha:]_][[:alnum:]_]*/ : /[^\W\d]\w*/ - + + IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? Regexp.new('[[:alpha:]_[^\0-\177]][[:alnum:]_[^\0-\177]]*') : /[^\W\d]\w*/ + METHOD_NAME = / #{IDENT} [?!]? /ox METHOD_NAME_OPERATOR = / \*\*? # multiplication and power |