diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-05 11:29:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-05 11:29:27 +0000 |
commit | 2ff56cc9b4dd3566277d2201774f80fef9aefdde (patch) | |
tree | 0367de1542f5365db49f9d68897871321e1654d7 | |
parent | 708df44e59915557aca1c5962d0dd196177b7e63 (diff) | |
download | ruby-2ff56cc9b4dd3566277d2201774f80fef9aefdde.tar.gz |
proc.c: revert r39224
* proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | proc.c | 1 | ||||
-rw-r--r-- | test/ruby/test_method.rb | 3 |
3 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Mar 5 20:29:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988] + Tue Mar 5 20:23:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * include/ruby/intern.h (rb_check_arity): make a static inline @@ -949,7 +949,6 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope) 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?"); diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 7de4479a2b..ef4943c345 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -550,6 +550,7 @@ class TestMethod < Test::Unit::TestCase 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 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 |