From 45e3ab86da30206d65e10f0c8e3f0ccb50d9badf Mon Sep 17 00:00:00 2001 From: Michael Go Date: Thu, 24 Oct 2024 22:23:27 -0300 Subject: [PATCH] more micro optimization --- lib/liquid/tokenizer.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/liquid/tokenizer.rb b/lib/liquid/tokenizer.rb index 4f683a27..54d71a2c 100644 --- a/lib/liquid/tokenizer.rb +++ b/lib/liquid/tokenizer.rb @@ -87,6 +87,13 @@ module Liquid @ss.pos += 1 until @ss.eos? + while byte_a != OPEN_CURLEY && byte_a != CLOSE_CURLEY && @ss.eos? == false + byte_a = @ss.peek_byte + @ss.pos += 1 + end + + break if @ss.eos? + byte_b = @ss.peek_byte if byte_a == CLOSE_CURLEY && byte_b == CLOSE_CURLEY