From: "matz (Yukihiro Matsumoto) via ruby-core" Date: 2026-11-19T07:38:44+00:00 Subject: [ruby-core:127616] [Ruby Feature#22484] Object#undef_singleton_method and Object#remove_singleton_method Issue #22484 has been updated by matz (Yukihiro Matsumoto). 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. ---------------------------------------- Feature #22484: Object#undef_singleton_method and Object#remove_singleton_method https://bugs.ruby-lang.org/issues/22484#change-120135 * Author: UlyssesZhan (Ulysses Zhan) * Status: Rejected ---------------------------------------- Equivalent to `singleton_class.undef_method` and `singleton_class.remove_method`. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/