Actions
Feature #22484
closedObject#undef_singleton_method and Object#remove_singleton_method
Feature #22484:
Object#undef_singleton_method and Object#remove_singleton_method
Status:
Rejected
Assignee:
-
Target version:
-
Description
Equivalent to singleton_class.undef_method and singleton_class.remove_method.
Updated by matz (Yukihiro Matsumoto) 9 days ago
- Status changed from Open to Rejected
My answer is the same as in #22473. obj.singleton_class.remove_method(:name) and obj.singleton_class.undef_method(:name) already do this clearly, and removing singleton methods is rare. I'd also like to be careful about adding methods to Object.
So I am not going to accept this proposal. If you have a concrete use case where the current way is really inconvenient, please describe it and we can reconsider.
Matz.
Actions