summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 06:20:18 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 06:20:18 +0000
commit1fc111198aaa4bcc184d4dbb151fccdbf2ee1da6 (patch)
treee41ca983b8f019a0a56b49c5dd388be1f23c26f7 /test
parentd3216922c2f42453dcacc65f5409b623d01707df (diff)
merge revision(s) 35080: [Backport #7353]
* gc.c (free_method_entry_i): method entry may be in unlinked_method_entry_list. [ruby-core:43383][Bug #6171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_method.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 2cc0de5409..ea6c5f2164 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -460,4 +460,16 @@ class TestMethod < Test::Unit::TestCase
assert_nothing_raised { v.instance_eval { mv2 } }
assert_nothing_raised { v.instance_eval { mv3 } }
end
+
+ def test_bound_method_entry
+ bug6171 = '[ruby-core:43383]'
+ assert_ruby_status([], <<-EOC, bug6171)
+ class Bug6171
+ def initialize(target)
+ define_singleton_method(:reverse, target.method(:reverse).to_proc)
+ end
+ end
+ 1000.times {p = Bug6171.new('test'); 10000.times {p.reverse}}
+ EOC
+ end
end