Actions
Backport #7843
closedA weird exception is raised when attempting to remove a "prepend"ed method
Status:
Closed
Assignee:
Description
Hello,
module P
def m; puts "P"; super; end
end
class A
def m; puts "A"; end
prepend P
remove_method :m
#=> undefined method `method_removed' for #<A:0x007f9e1e825618>
end
Is this intentional?
--
Yusuke Endoh mame@tsg.ne.jp
Updated by matz (Yukihiro Matsumoto) about 11 years ago
No, it must be a bug.
Matz.
Updated by nobu (Nobuyoshi Nakada) about 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r39235.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
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]
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Assignee changed from matz (Yukihiro Matsumoto) to nagachika (Tomoyuki Chikanaga)
- Target version deleted (
2.6)
Actions
Like0
Like0Like0Like0