From c6bda764b15899e34ddb00b6d2e26a45ea8f77a4 Mon Sep 17 00:00:00 2001 From: ksss Date: Wed, 14 Jan 2026 10:38:52 +0900 Subject: [PATCH] Add signature for `Module#method_undefined` --- core/module.rbs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/core/module.rbs b/core/module.rbs index 234cf7d8e..c5e43339c 100644 --- a/core/module.rbs +++ b/core/module.rbs @@ -1104,6 +1104,31 @@ class Module < Object # private def method_removed: (Symbol method_name) -> untyped + # + # Invoked as a callback whenever an instance method is undefined from the + # receiver. + # + # module Chatty + # def self.method_undefined(method_name) + # puts "Undefining #{method_name.inspect}" + # end + # def self.some_class_method() end + # def some_instance_method() end + # class << self + # undef_method :some_class_method + # end + # undef_method :some_instance_method + # end + # + # *produces:* + # + # Undefining :some_instance_method + # + private def method_undefined: (Symbol method_name) -> untyped + #