mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:01 -05:00
Test only with Ruby 1.9+
This commit is contained in:
@@ -57,10 +57,12 @@ module ActiveRecord
|
||||
assert_nil column.type_cast(Object.new)
|
||||
end
|
||||
|
||||
def test_type_cast_nan_and_infinity_to_integer
|
||||
column = Column.new("field", nil, "integer")
|
||||
assert_nil column.type_cast(Float::NAN)
|
||||
assert_nil column.type_cast(1.0/0.0)
|
||||
if RUBY_VERSION > '1.9'
|
||||
def test_type_cast_nan_and_infinity_to_integer
|
||||
column = Column.new("field", nil, "integer")
|
||||
assert_nil column.type_cast(Float::NAN)
|
||||
assert_nil column.type_cast(1.0/0.0)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user