Fix conditions using negative number comparisons

This commit is contained in:
Dennis Theisen
2012-03-12 16:38:34 -04:00
parent b8d7b9aeda
commit 0e3b522fe2
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -136,11 +136,11 @@ module Liquid
$1
when /^"(.*)"$/ # Double quoted strings
$1
when /^(\d+)$/ # Integer and floats
when /^(-?\d+)$/ # Integer and floats
$1.to_i
when /^\((\S+)\.\.(\S+)\)$/ # Ranges
(resolve($1).to_i..resolve($2).to_i)
when /^(\d[\d\.]+)$/ # Floats
when /^(-?\d[\d\.]+)$/ # Floats
$1.to_f
else
variable(key)