summaryrefslogtreecommitdiff
path: root/test/bigdecimal/test_bigdecimal.rb
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-24 06:22:41 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-24 06:22:41 +0000
commitea68278fe39f0b7f7dba6a34ae8bf6d4acb94fb5 (patch)
treeb98d64b1688142e413f2b7fc2e01be7136adcf57 /test/bigdecimal/test_bigdecimal.rb
parent9f68d0f59196f356b9c20f23a5299c3d32559eae (diff)
bigdecimal: version 1.3.4
Import bigdecimal version 1.3.4. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.3...v1.3.4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal/test_bigdecimal.rb')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 6d0430d..595783c 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -2,8 +2,6 @@
require_relative "testbase"
require 'bigdecimal/math'
-require 'thread'
-
class TestBigDecimal < Test::Unit::TestCase
include TestBigDecimalBase
@@ -1777,25 +1775,27 @@ class TestBigDecimal < Test::Unit::TestCase
end
def test_clone
- assert_warning(/BigDecimal#clone is deprecated/) do
- BigDecimal(0).clone
+ assert_warning(/^$/) do
+ x = BigDecimal(0)
+ assert_same(x, x.clone)
end
end
def test_dup
- assert_warning(/BigDecimal#dup is deprecated/) do
+ assert_warning(/^$/) do
[1, -1, 2**100, -2**100].each do |i|
x = BigDecimal(i)
- assert_equal(x, x.dup)
+ assert_same(x, x.dup)
end
end
end
def test_dup_subclass
- assert_warning(/BigDecimal#dup is deprecated/) do
+ assert_warning(/BigDecimal\.new is deprecated/) do
c = Class.new(BigDecimal)
x = c.new(1)
y = x.dup
+ assert_same(x, y)
assert_equal(1, y)
assert_kind_of(c, y)
end