diff options
author | murphy <murphy@rubychan.de> | 2006-10-18 10:28:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-10-18 10:28:21 +0000 |
commit | ec08216346b0d73b9118dbf498cff675924d40b0 (patch) | |
tree | 8976acc19c2784e525a214f889be8b0cf841a6c9 /lib/coderay/scanners/ruby | |
parent | 4666c2ced49f4b45f6106f0a9cb728c3f2fb1814 (diff) | |
download | coderay-ec08216346b0d73b9118dbf498cff675924d40b0.tar.gz |
Fixed warning in bench.rb.
Ruby Scanner: improved handling of ambiguos values.
- operator methods are now :ident instead of :operator
- fancy_allowed and regexp_allowed are now value_expected
- value_expected works in operator method calls
- tests enhanced and adjusted
Scanner tests: new diffed option, diff doesn't imply noassert anymore
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index 6023b21..51cdb95 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -127,6 +127,19 @@ module Scanners .*? (?: \Z | (?=^\#CODE) ) /mx + + # Checks for a valid value to follow. This enables + # fancy_allowed in method calls. + VALUE_FOLLOWS = / + \s+ + (?: + [%\/][^\s=] + | + <<-?\S + | + #{CHARACTER} + ) + /x RUBYDOC_OR_DATA = / #{RUBYDOC} | #{DATA} /xo |