Code beautifier

- standardfilters.rb
  - standard_filter_test.rb
This commit is contained in:
DBA
2010-08-23 01:30:00 +08:00
committed by Tobias Lütke
parent 29e140b655
commit c59cde9d17
2 changed files with 130 additions and 131 deletions
+9 -9
View File
@@ -209,16 +209,16 @@ module Liquid
private private
def to_number(obj) def to_number(obj)
case obj case obj
when Numeric when Numeric
obj obj
when String when String
(obj.strip =~ /^\d+\.\d+$/) ? obj.to_f : obj.to_i (obj.strip =~ /^\d+\.\d+$/) ? obj.to_f : obj.to_i
else else
0 0
end
end end
end
end end
-1
View File
@@ -176,4 +176,3 @@ class StandardFiltersTest < Test::Unit::TestCase
end end
end end