summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-07 23:09:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-07 23:11:59 +0900
commit0261519f6e69f16e0f995be423688b7957573f67 (patch)
tree5dd53c09ad7109788c26d7804e9500e9ced568e9 /object.c
parent478716f49a19cdd86f629c6a0673c1ff53630c96 (diff)
[DOC] Module#method_undefined
Diffstat (limited to 'object.c')
-rw-r--r--object.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/object.c b/object.c
index 64cf88ae9f..b52cfbf685 100644
--- a/object.c
+++ b/object.c
@@ -980,6 +980,32 @@ rb_class_search_ancestor(VALUE cl, VALUE c)
*
*/
+/* Document-method: method_undefined
+ *
+ * call-seq:
+ * method_undefined(method_name)
+ *
+ * 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
+ *
+ * <em>produces:</em>
+ *
+ * Undefining :some_instance_method
+ *
+ */
+
/*
* Document-method: singleton_method_added
*