From 2c2df29ba237c3abdc99b09b96040d9fe6e6dd1d Mon Sep 17 00:00:00 2001 From: John Backus Date: Sun, 29 May 2016 18:59:42 -0700 Subject: [PATCH] Add initialization of @literal to silence warning --- lib/regexp_parser/scanner/scanner.rl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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