ruby-changes:27547
From: nobu <ko1@a...>
Date: Tue, 5 Mar 2013 20:29:37 +0900 (JST)
Subject: [ruby-changes:27547] nobu:r39599 (trunk): proc.c: revert r39224
nobu 2013-03-05 20:29:27 +0900 (Tue, 05 Mar 2013) New Revision: 39599 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39599 Log: proc.c: revert r39224 * proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988] Modified files: trunk/ChangeLog trunk/proc.c trunk/test/ruby/test_method.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39598) +++ ChangeLog (revision 39599) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Mar 5 20:29:25 2013 Nobuyoshi Nakada <nobu@r...> + + * proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988] + Tue Mar 5 20:23:54 2013 Nobuyoshi Nakada <nobu@r...> * include/ruby/intern.h (rb_check_arity): make a static inline Index: proc.c =================================================================== --- proc.c (revision 39598) +++ proc.c (revision 39599) @@ -949,7 +949,6 @@ mnew(VALUE klass, VALUE obj, ID id, VALU https://github.com/ruby/ruby/blob/trunk/proc.c#L949 rb_method_flag_t flag = NOEX_UNDEF; again: - if (klass) klass = RCLASS_ORIGIN(klass); me = rb_method_entry_without_refinements(klass, id, &defined_class); if (UNDEFINED_METHOD_ENTRY_P(me)) { ID rmiss = rb_intern("respond_to_missing?"); Index: test/ruby/test_method.rb =================================================================== --- test/ruby/test_method.rb (revision 39598) +++ test/ruby/test_method.rb (revision 39599) @@ -550,6 +550,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L550 def test_prepended bug7836 = '[ruby-core:52160] [Bug #7836]' + bug7988 = '[ruby-core:53038] [Bug #7988]' m = Module.new { def foo end @@ -559,7 +560,7 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_method.rb#L560 end prepend m } - assert_equal(c, c.instance_method(:foo).owner, bug7836) + assert_raise(NameError, bug7988) {Module.new{prepend m}.instance_method(:bar)} end def test_gced_bmethod -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/