Skip to content

Commit d87cdc1

Browse files
committed
Merge branch 'fix-ruby-unicode' into fix-ruby-new-hash-syntax
2 parents 7f664a6 + aa01f05 commit d87cdc1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/coderay/scanners/ruby/patterns.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ module Ruby::Patterns # :nodoc: all
3434
add(%w[ undef ], :undef_expected).
3535
add(%w[ alias ], :alias_expected).
3636
add(%w[ class module ], :module_expected)
37-
38-
IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? /[[:alpha:]_][[:alnum:]_]*/ : /[^\W\d]\w*/
39-
37+
38+
IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? Regexp.new('[[:alpha:]_[^\0-\177]][[:alnum:]_[^\0-\177]]*') : /[^\W\d]\w*/
39+
4040
METHOD_NAME = / #{IDENT} [?!]? /ox
4141
METHOD_NAME_OPERATOR = /
4242
\*\*? # multiplication and power

0 commit comments

Comments
 (0)