summaryrefslogtreecommitdiff
path: root/test/bigdecimal
diff options
context:
space:
mode:
Diffstat (limited to 'test/bigdecimal')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 4598936b9a..6928834907 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -1876,6 +1876,12 @@ class TestBigDecimal < Test::Unit::TestCase
EOS
end
+ def test_no_initialize_copy
+ assert_equal(false, BigDecimal(1).respond_to?(:initialize_copy, true))
+ assert_equal(false, BigDecimal(1).respond_to?(:initialize_dup, true))
+ assert_equal(false, BigDecimal(1).respond_to?(:initialize_clone, true))
+ end
+
def assert_no_memory_leak(code, *rest, **opt)
code = "8.times {20_000.times {begin #{code}; rescue NoMemoryError; end}; GC.start}"
super(["-rbigdecimal"],