Skip to content

Commit 1632c66

Browse files
committed
avoid regexp syntax warnings on Ruby 1.8
1 parent 44a4f08 commit 1632c66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/java.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Java < Scanner
4444
'"' => /[^\\"]+/,
4545
'/' => /[^\\\/]+/,
4646
} # :nodoc:
47-
IDENT = RUBY_VERSION < '1.9' ? /[a-zA-Z_][A-Za-z_0-9]*/ : /[[[:alpha:]]_][[[:alnum:]]_]*/ # :nodoc:
47+
IDENT = RUBY_VERSION < '1.9' ? /[a-zA-Z_][A-Za-z_0-9]*/ : Regexp.new('[[[:alpha:]]_][[[:alnum:]]_]*') # :nodoc:
4848

4949
protected
5050

0 commit comments

Comments
 (0)