diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-14 13:08:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-14 13:08:50 +0000 |
commit | 452f46b751a93a97fe42febebe8e8d5241752475 (patch) | |
tree | 37eb50bc1f4a6c08ed3d731bf5050fc7ba25d7a9 /test/ruby/test_method.rb | |
parent | 9eb92007b6c2ab2b1fe031c3681144e51e2bcc14 (diff) | |
download | ruby-452f46b751a93a97fe42febebe8e8d5241752475.tar.gz |
test/ruby/test_method.rb: refined [ruby-core:81666] [Bug #13656]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r-- | test/ruby/test_method.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 9722e1b1a4..1f8b86acdc 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -902,14 +902,15 @@ class TestMethod < Test::Unit::TestCase end def test_super_method_with_prepended_module - bug = '[ruby-core:81666] [Bug #13656]' + bug = '[ruby-core:81666] [Bug #13656] should be the method of the parent' c1 = EnvUtil.labeled_class("C1") {def m; end} c2 = EnvUtil.labeled_class("C2", c1) {def m; end} c2.prepend(EnvUtil.labeled_module("M")) - m = c2.instance_method(:m) - assert_equal(c2, m.owner) - m = m.super_method - assert_equal(c1, m.owner, bug) + m1 = c1.instance_method(:m) + m2 = c2.instance_method(:m).super_method + assert_equal(m1, m2, bug) + assert_equal(c1, m2.owner, bug) + assert_equal(m1.source_location, m2.source_location, bug) end def rest_parameter(*rest) |