vm_method.c: fix method_removed

* vm_method.c: call method_removed hook on called class, not on
  prepending iclass.  [ruby-core:52207] [Bug #7843]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-14 01:38:07 +00:00
Родитель 01e43fb0e2
Коммит bd255c4686
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1,7 +1,7 @@
Thu Feb 14 10:30:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Feb 14 10:30:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c: call method_removed hook on called class, not on * vm_method.c: call method_removed hook on called class, not on
prepending iclass. prepending iclass. [ruby-core:52207] [Bug #7843]
Thu Feb 14 10:05:57 2013 Eric Hodel <drbrain@segment7.net> Thu Feb 14 10:05:57 2013 Eric Hodel <drbrain@segment7.net>

Просмотреть файл

@ -1397,7 +1397,7 @@ class TestModule < Test::Unit::TestCase
c.singleton_class.class_eval do c.singleton_class.class_eval do
define_method(:method_removed) {|id| removed = id} define_method(:method_removed) {|id| removed = id}
end end
assert_nothing_raised(NoMethodError, NameError) do assert_nothing_raised(NoMethodError, NameError, '[Bug #7843]') do
c.class_eval do c.class_eval do
remove_method(:foo) remove_method(:foo)
end end