From 286a3c6d71fcb3d59820833c022d1af5e6e03b0a Mon Sep 17 00:00:00 2001 From: murphy Date: Thu, 15 Apr 2010 00:50:20 +0000 Subject: More cleanup. --- lib/coderay/scanners/ruby.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/coderay/scanners/ruby.rb') 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 -- cgit v1.2.1