diff --git a/lib/regexp_parser/scanner/scanner.rl b/lib/regexp_parser/scanner/scanner.rl index 231469b..1bf8955 100644 --- a/lib/regexp_parser/scanner/scanner.rl +++ b/lib/regexp_parser/scanner/scanner.rl @@ -832,7 +832,7 @@ module Regexp::Scanner # This method may raise errors if a syntax error is encountered. # -------------------------------------------------------------------------- def self.scan(input_object, &block) - top, stack = 0, [] + @literal, top, stack = nil, 0, [] if input_object.is_a?(Regexp) input = input_object.source