From d9bb7f2f718d5eb6ac104f7b661e32fae22f808c Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 2 Mar 2012 18:02:58 +0100 Subject: replace weird regexp that confuses ruby-head --- lib/coderay/scanners/python.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/coderay/scanners') diff --git a/lib/coderay/scanners/python.rb b/lib/coderay/scanners/python.rb index 5e38a2c..cbdbbdb 100644 --- a/lib/coderay/scanners/python.rb +++ b/lib/coderay/scanners/python.rb @@ -61,7 +61,7 @@ module Scanners add(PREDEFINED_VARIABLES_AND_CONSTANTS, :predefined_constant). add(PREDEFINED_EXCEPTIONS, :exception) # :nodoc: - NAME = / [^\W\d] \w* /x # :nodoc: + NAME = / [[:alpha:]_] \w* /x # :nodoc: ESCAPE = / [abfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc: UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} | N\{[-\w ]+\} /x # :nodoc: -- cgit v1.2.1 From 36b1799efc9b74b556ca698c3e3808a363d3fabc Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sat, 31 Mar 2012 21:40:23 +0200 Subject: specify encoding of PHP scanner file (fails when RUBYOPT=-Ku is set) --- lib/coderay/scanners/php.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/coderay/scanners') diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index dadab00..8acfff5 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -1,3 +1,4 @@ +# encoding: ASCII-8BIT module CodeRay module Scanners -- cgit v1.2.1