From e2f4f34467f90bc9bc30891c9cdb4aa82fa0e37c Mon Sep 17 00:00:00 2001 From: nari Date: Mon, 28 May 2012 03:12:33 +0000 Subject: * gc.c (obj_free): doesn't free a method table if it doesn't exits. [ruby-dev:44436] * test/ruby/test_gc.rb (class TestGc): added the test case for this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_gc.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index adcf85e79e..782d8fde3d 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -78,6 +78,20 @@ class TestGc < Test::Unit::TestCase EOS end + def test_singleton_method_added + assert_in_out_err(%w[--disable-gems], <<-EOS, [], [], "[ruby-dev:44436]") + class BasicObject + def singleton_method_added(mid) + raise + end + end + b = proc {} + class << b; end + b.clone rescue nil + GC.start + EOS + end + def test_gc_parameter env = { "RUBY_GC_MALLOC_LIMIT" => "60000000", -- cgit v1.2.3