diff --git a/core/float/shared/to_i.rb b/core/float/shared/to_i.rb index 960295f095..33b32ca533 100644 --- a/core/float/shared/to_i.rb +++ b/core/float/shared/to_i.rb @@ -7,4 +7,8 @@ -9223372036854775808.1.send(@method).should eql(-9223372036854775808) 9223372036854775808.1.send(@method).should eql(9223372036854775808) end + + it "raises a FloatDomainError for NaN" do + -> { nan_value.send(@method) }.should raise_error(FloatDomainError) + end end