summaryrefslogtreecommitdiff
path: root/lib/coderay
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-04-15 00:18:47 +0000
committermurphy <murphy@rubychan.de>2010-04-15 00:18:47 +0000
commit5b780920ea3224e3973c582b7aed03929c1003d7 (patch)
tree6964de8e838b00649f0a61ac4307515b32fe85c3 /lib/coderay
parentb9a5e582ff24d361766b34c8360ed85db6dbf279 (diff)
downloadcoderay-5b780920ea3224e3973c582b7aed03929c1003d7.tar.gz
Cleanups.
Diffstat (limited to 'lib/coderay')
-rw-r--r--lib/coderay/scanners/ruby.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 5317d62..e4de0d1 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -39,8 +39,8 @@ module Scanners
heredocs = nil
inline_block_stack = nil
inline_block_curly_depth = 0
- def_object_stack = nil
- def_object_paren_depth = 0
+ # def_object_stack = nil
+ # def_object_paren_depth = 0
unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8'
patterns = Patterns # avoid constant lookup
@@ -402,6 +402,15 @@ module Scanners
next
end
+ elsif state == :undef_comma_expected
+ if match = scan(/,/)
+ kind = :operator
+ state = :undef_expected
+ else
+ state = :initial
+ next
+ end
+
elsif state == :alias_expected
match = scan(unicode ? /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/uo :
/(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/o)
@@ -414,15 +423,6 @@ module Scanners
state = :initial
next
- elsif state == :undef_comma_expected
- if match = scan(/,/)
- kind = :operator
- state = :undef_expected
- else
- state = :initial
- next
- end
-
end
if $CODERAY_DEBUG and not kind