mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
use Kernel Integer parsing for simple Integer expression
This commit is contained in:
@@ -116,7 +116,7 @@ module Liquid
|
|||||||
# check if the markup is simple integer or float
|
# check if the markup is simple integer or float
|
||||||
case markup
|
case markup
|
||||||
when INTEGER_REGEX
|
when INTEGER_REGEX
|
||||||
return markup.to_i
|
return Integer(markup, 10)
|
||||||
when FLOAT_REGEX
|
when FLOAT_REGEX
|
||||||
return markup.to_f
|
return markup.to_f
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user