summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 03d7cab2d7..23b348a94f 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -522,4 +522,18 @@ class TestMethod < Test::Unit::TestCase
assert_equal(x.singleton_class, x.method(:bar).owner)
assert(x.method(:foo) != x.method(:bar), bug7613)
end
+
+ def test_gced_bmethod
+ assert_normal_exit %q{
+ require 'irb'
+ IRB::Irb.module_eval do
+ define_method(:eval_input) do
+ IRB::Irb.module_eval { alias_method :eval_input, :to_s }
+ GC.start
+ Kernel
+ end
+ end
+ IRB.start
+ }, '[Bug #7825]'
+ end
end