Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix changed version of obj.to_f's behavior.

  • Loading branch information...
commit 23bd6d5eab50a73acf96adc62c9adeeaa9d114ff 1 parent aec50a8
@nurse nurse authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/kernel/Float_spec.rb
View
4 core/kernel/Float_spec.rb
@@ -197,14 +197,14 @@ def to_f() 1.2 end
@object.send(:Float, obj).should == 1.2
end
- ruby_version_is '' ... '1.9' do
+ ruby_version_is '' ... '1.8.7' do
it "raises an Argument Error if to_f is called and it returns NaN" do
(nan = mock('NaN')).should_receive(:to_f).once.and_return(nan_value)
lambda { @object.send(:Float, nan) }.should raise_error(ArgumentError)
end
end
- ruby_version_is '1.9' do
+ ruby_version_is '1.8.7' do
it "returns the identical NaN if to_f is called and it returns NaN" do
nan = nan_value
(nan_to_f = mock('NaN')).should_receive(:to_f).once.and_return(nan)
Please sign in to comment.
Something went wrong with that request. Please try again.