summaryrefslogtreecommitdiff
path: root/spec/ruby/library/bigdecimal/shared
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/bigdecimal/shared')
-rw-r--r--spec/ruby/library/bigdecimal/shared/eql.rb4
-rw-r--r--spec/ruby/library/bigdecimal/shared/modulo.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/bigdecimal/shared/eql.rb b/spec/ruby/library/bigdecimal/shared/eql.rb
index eaad272e9a..8e3e388bab 100644
--- a/spec/ruby/library/bigdecimal/shared/eql.rb
+++ b/spec/ruby/library/bigdecimal/shared/eql.rb
@@ -2,8 +2,8 @@ require 'bigdecimal'
describe :bigdecimal_eql, shared: true do
before :each do
- @bg6543_21 = BigDecimal.new("6543.21")
- @bg5667_19 = BigDecimal.new("5667.19")
+ @bg6543_21 = BigDecimal("6543.21")
+ @bg5667_19 = BigDecimal("5667.19")
@a = BigDecimal("1.0000000000000000000000000000000000000000005")
@b = BigDecimal("1.00000000000000000000000000000000000000000005")
@bigint = BigDecimal("1000.0")
diff --git a/spec/ruby/library/bigdecimal/shared/modulo.rb b/spec/ruby/library/bigdecimal/shared/modulo.rb
index 78ebe8360d..c9691cbf37 100644
--- a/spec/ruby/library/bigdecimal/shared/modulo.rb
+++ b/spec/ruby/library/bigdecimal/shared/modulo.rb
@@ -18,8 +18,8 @@ describe :bigdecimal_modulo, shared: true do
end
it "returns self modulo other" do
- bd6543 = BigDecimal.new("6543.21")
- bd5667 = BigDecimal.new("5667.19")
+ bd6543 = BigDecimal("6543.21")
+ bd5667 = BigDecimal("5667.19")
a = BigDecimal("1.0000000000000000000000000000000000000000005")
b = BigDecimal("1.00000000000000000000000000000000000000000005")
@@ -107,7 +107,7 @@ end
describe :bigdecimal_modulo_zerodivisionerror, shared: true do
it "raises ZeroDivisionError if other is zero" do
- bd5667 = BigDecimal.new("5667.19")
+ bd5667 = BigDecimal("5667.19")
lambda { bd5667.send(@method, 0) }.should raise_error(ZeroDivisionError)
lambda { bd5667.send(@method, BigDecimal("0")) }.should raise_error(ZeroDivisionError)