diff options
Diffstat (limited to 'lib/coderay/scanners/ruby.rb')
-rw-r--r-- | lib/coderay/scanners/ruby.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index e4de0d1..0e8e802 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -32,18 +32,22 @@ module Scanners def scan_tokens tokens, options + patterns = Patterns # avoid constant lookup + state = :initial last_state = nil + method_call_expected = false value_expected = true + heredocs = nil inline_block_stack = nil inline_block_curly_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 + unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8' until eos? match = nil |