diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_method.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index bb506f1258..6ad9620a00 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -459,6 +459,14 @@ class TestMethod < Test::Unit::TestCase c3.class_eval { alias bar foo } m3 = c3.new.method(:bar) assert_equal("#<Method: #{c3.inspect}(#{c.inspect})#bar(foo)() #{__FILE__}:#{line_no}>", m3.inspect, bug7806) + + bug15608 = '[ruby-core:91570] [Bug #15608]' + c4 = Class.new(c) + c4.class_eval { alias bar foo } + o = c4.new + o.singleton_class + m4 = o.method(:bar) + assert_equal("#<Method: #{c4.inspect}(#{c.inspect})#bar(foo)() #{__FILE__}:#{line_no}>", m4.inspect, bug15608) end def test_callee_top_level |