diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-16 04:36:44 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-16 04:36:44 +0000 |
commit | 8b440f54bd26bf4b7e31731aade577cb60858f7b (patch) | |
tree | 4743f115455439c5a4f566fb12c228508c60fcac /test | |
parent | 36ecd73133f43b336ace7943ad1c91c3ce4ef9ad (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_2@55921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_gc.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 7ac67c4757..0dad81671b 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -377,4 +377,11 @@ class TestGc < Test::Unit::TestCase C.new 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 |