From e05719fb82bbd43d4d7886453e1a7c9a298f847e Mon Sep 17 00:00:00 2001 From: Michael Go Date: Mon, 25 Nov 2024 15:22:53 -0400 Subject: [PATCH] use Kernel Integer parsing for simple Integer expression --- lib/liquid/expression.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/expression.rb b/lib/liquid/expression.rb index 5ed4712f..b3e0b36e 100644 --- a/lib/liquid/expression.rb +++ b/lib/liquid/expression.rb @@ -116,7 +116,7 @@ module Liquid # check if the markup is simple integer or float case markup when INTEGER_REGEX - return markup.to_i + return Integer(markup, 10) when FLOAT_REGEX return markup.to_f end