diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-29 14:35:37 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-29 14:35:37 +0000 |
commit | 021bec087823b11e60a669ed0390096d978b893e (patch) | |
tree | 70d928d35c01b51bb9a6cdc44af4bd7cc05a669b /spec/rubyspec/library/bigdecimal/lte_spec.rb | |
parent | a6c9453d869479e23ce0c0349795ea5853ac1898 (diff) | |
download | ruby-021bec087823b11e60a669ed0390096d978b893e.tar.gz |
Update to ruby/spec@abf1700
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec/library/bigdecimal/lte_spec.rb')
-rw-r--r-- | spec/rubyspec/library/bigdecimal/lte_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/rubyspec/library/bigdecimal/lte_spec.rb b/spec/rubyspec/library/bigdecimal/lte_spec.rb index 61fb676245..5cda9842bd 100644 --- a/spec/rubyspec/library/bigdecimal/lte_spec.rb +++ b/spec/rubyspec/library/bigdecimal/lte_spec.rb @@ -28,6 +28,10 @@ describe "BigDecimal#<=" do @infinity = BigDecimal("Infinity") @infinity_neg = BigDecimal("-Infinity") + + @float_infinity = Float::INFINITY + @float_infinity_neg = -Float::INFINITY + @nan = BigDecimal("NaN") end @@ -68,6 +72,17 @@ describe "BigDecimal#<=" do (@infinity_neg <= @infinity).should == true end + ruby_bug "#13674", ""..."2.4" do + it "properly handles Float infinity values" do + @values.each { |val| + (val <= @float_infinity).should == true + (@float_infinity <= val).should == false + (val <= @float_infinity_neg).should == false + (@float_infinity_neg <= val).should == true + } + end + end + it "properly handles NaN values" do @values += [@infinity, @infinity_neg, @nan] @values.each { |val| |