ruby-changes:46967
From: nobu <ko1@a...>
Date: Wed, 14 Jun 2017 22:08:55 +0900 (JST)
Subject: [ruby-changes:46967] nobu:r59082 (trunk): test/ruby/test_method.rb: refined [Bug #13656]
nobu 2017-06-14 22:08:50 +0900 (Wed, 14 Jun 2017) New Revision: 59082 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59082 Log: test/ruby/test_method.rb: refined [ruby-core:81666] [Bug #13656] Modified files: trunk/test/ruby/test_method.rb Index: test/ruby/test_method.rb =================================================================== --- test/ruby/test_method.rb (revision 59081) +++ test/ruby/test_method.rb (revision 59082) @@ -902,14 +902,15 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L902 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/