summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-16 04:29:37 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-16 04:29:37 +0000
commit7f7360a885974e64f27cad05f27f87eaf595caa8 (patch)
treeafb5b977dc00b0ef60905e4dd86ac970813b0659 /test
parent2f0555c3a116b130eaa724842b014a31306f41de (diff)
merge revision(s) 55663: [Backport #12583]
* gc.c (gc_mark_roots): should mark the VM object itself to mark singleton class of the VM object. Before this patch, we only set mark bit for the VM object and invoke mark function separately. [Bug #12583] * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_gc.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 0e3ae4bc42..51b17c6f82 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -397,4 +397,11 @@ class TestGc < Test::Unit::TestCase
GC.enable unless disabled
end
end
+
+ def test_vm_object
+ assert_normal_exit <<-'end', '[Bug #12583]'
+ ObjectSpace.each_object{|o| o.singleton_class rescue 0}
+ ObjectSpace.each_object{|o| case o when Module then o.instance_methods end}
+ end
+ end
end