[前][次][番号順一覧][スレッド一覧]

ruby-changes:65181

From: Nobuyoshi <ko1@a...>
Date: Sun, 7 Feb 2021 23:12:38 +0900 (JST)
Subject: [ruby-changes:65181] 0261519f6e (master): [DOC] Module#method_undefined

https://git.ruby-lang.org/ruby.git/commit/?id=0261519f6e

From 0261519f6e69f16e0f995be423688b7957573f67 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 7 Feb 2021 23:09:00 +0900
Subject: [DOC] Module#method_undefined

---
 object.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/object.c b/object.c
index 64cf88a..b52cfbf 100644
--- a/object.c
+++ b/object.c
@@ -980,6 +980,32 @@ rb_class_search_ancestor(VALUE cl, VALUE c) https://github.com/ruby/ruby/blob/trunk/object.c#L980
  *
  */
 
+/* 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
  *
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]