summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby/patterns.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-12-11 04:15:33 +0000
committermurphy <murphy@rubychan.de>2005-12-11 04:15:33 +0000
commit952c57ba77b5a36111b9f82f8632e58208c998c4 (patch)
tree8d043fa12c27893c9e8ea8d3596352ce0110f74e /lib/coderay/scanners/ruby/patterns.rb
parente1aaa2c6c608aaf2577b49a72538d6fe7ceedc27 (diff)
downloadcoderay-952c57ba77b5a36111b9f82f8632e58208c998c4.tar.gz
scanners/ruby/patterns.rb:
Changed recognition of numerics + and - prefixes now belong to the number. tests and demos adjusted. helpers/plugin.rb: Typo in doc.
Diffstat (limited to 'lib/coderay/scanners/ruby/patterns.rb')
-rw-r--r--lib/coderay/scanners/ruby/patterns.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb
index ad649da..2933109 100644
--- a/lib/coderay/scanners/ruby/patterns.rb
+++ b/lib/coderay/scanners/ruby/patterns.rb
@@ -71,7 +71,7 @@ module CodeRay module Scanners
EXPONENT = / [eE] [+-]? #{DECIMAL} /ox
FLOAT_SUFFIX = / #{EXPONENT} | \. #{DECIMAL} #{EXPONENT}? /ox
FLOAT_OR_INT = / #{DECIMAL} (?: #{FLOAT_SUFFIX} () )? /ox
- NUMERIC = / (?=0) (?: #{OCTAL} | #{HEXADECIMAL} | #{BINARY} ) | #{FLOAT_OR_INT} /ox
+ NUMERIC = / [-+]? (?: (?=0) (?: #{OCTAL} | #{HEXADECIMAL} | #{BINARY} ) | #{FLOAT_OR_INT} ) /ox
SYMBOL = /
: