summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer')
-rw-r--r--spec/ruby/core/integer/coerce_spec.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/ruby/core/integer/coerce_spec.rb b/spec/ruby/core/integer/coerce_spec.rb
index 13fe7b3321..f1f3256032 100644
--- a/spec/ruby/core/integer/coerce_spec.rb
+++ b/spec/ruby/core/integer/coerce_spec.rb
@@ -1,5 +1,7 @@
require_relative '../../spec_helper'
+require 'bigdecimal'
+
describe "Integer#coerce" do
context "fixnum" do
describe "when given a Fixnum" do
@@ -89,16 +91,13 @@ describe "Integer#coerce" do
end
end
- ruby_version_is ""..."3.4" do
- require 'bigdecimal'
- context "bigdecimal" do
- it "produces Floats" do
- x, y = 3.coerce(BigDecimal("3.4"))
- x.class.should == Float
- x.should == 3.4
- y.class.should == Float
- y.should == 3.0
- end
+ context "bigdecimal" do
+ it "produces Floats" do
+ x, y = 3.coerce(BigDecimal("3.4"))
+ x.class.should == Float
+ x.should == 3.4
+ y.class.should == Float
+ y.should == 3.0
end
end