use Kernel Integer parsing for simple Integer expression

This commit is contained in:
Michael Go
2025-01-07 14:32:46 -04:00
parent ac374a208f
commit e05719fb82
+1 -1
View File
@@ -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