don't add a breaking change to Parser constructor

This commit is contained in:
Michael Go
2025-01-07 14:32:46 -04:00
parent e05719fb82
commit 253ec81b56
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -2,7 +2,8 @@
module Liquid
class Parser
def initialize(input, string_scanner)
def initialize(input)
input = input.is_a?(StringScanner) ? input : StringScanner.new(input.to_s)
@tokens = Lexer.tokenize(input, string_scanner)
@p = 0 # pointer to current location
end