diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_method.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 0ef913fd78..67c24a8fd8 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -782,6 +782,16 @@ class TestMethod < Test::Unit::TestCase assert_equal(:bar, m.call, feature8391) end + def test_singleton_method_prepend + bug14658 = '[Bug #14658]' + c1 = Class.new + o = c1.new + def o.bar; :bar; end + class << o; prepend Module.new; end + m = assert_nothing_raised(NameError, bug14658) {o.singleton_method(:bar)} + assert_equal(:bar, m.call, bug14658) + end + Feature9783 = '[ruby-core:62212] [Feature #9783]' def assert_curry_three_args(m) |