diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-01 02:10:19 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-01 02:10:19 +0000 |
commit | dfe6abce23ded858857927055f4d9103839c5723 (patch) | |
tree | c548a2cd2aeb418af18c98a7856ed7b70ac19ed6 /test | |
parent | c913031f18f2ac6d4cffe212e23e5aead07e2c94 (diff) | |
download | ruby-dfe6abce23ded858857927055f4d9103839c5723.tar.gz |
should not copy promoted flags.
* include/ruby/ruby.h (rb_clone_setup): should not copy some flags
(FL_PROMOTED0|FL_PROMOTED1|FL_FINALIZE).
[Bug #13775]
* test/ruby/test_object.rb: add a test (note that this test will fail
only when RGENGC_CHECK_MODE >= 2).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_object.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 1e952533a6..e7d623283f 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -934,4 +934,14 @@ class TestObject < Test::Unit::TestCase num.times {a.clone.set} end; end + + def test_clone_object_should_not_be_old + assert_normal_exit <<-EOS, '[Bug #13775]' + b = proc { } + 10.times do |i| + b.clone + GC.start + end + EOS + end end |