* object.c: Document Module#method_added and #method_removed.
Patch by Bryce Kerley. [Ruby 1.9 - Feature #4867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2adddf4c2b
commit
ca25e7962c
@ -1,3 +1,8 @@
|
||||
Fri Jun 17 09:11:05 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* object.c: Document Module#method_added and #method_removed.
|
||||
Patch by Bryce Kerley. [Ruby 1.9 - Feature #4867]
|
||||
|
||||
Fri Jun 17 08:50:16 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* io.c: Improve documentation of IO and File open and new.
|
||||
|
48
object.c
48
object.c
@ -580,6 +580,54 @@ rb_obj_tap(VALUE obj)
|
||||
* New subclass: Baz
|
||||
*/
|
||||
|
||||
/* Document-method: method_added
|
||||
*
|
||||
* call-seq:
|
||||
* method_added(method_name)
|
||||
*
|
||||
* Invoked as a callback whenever an instance method is added to the
|
||||
* receiver.
|
||||
*
|
||||
* module Chatty
|
||||
* def self.method_added(method_name)
|
||||
* puts "Adding #{method_name.inspect}"
|
||||
* end
|
||||
* def self.some_class_method() end
|
||||
* def some_instance_method() end
|
||||
* end
|
||||
*
|
||||
* produces:
|
||||
*
|
||||
* Adding :some_instance_method
|
||||
*
|
||||
*/
|
||||
|
||||
/* Document-method: method_removed
|
||||
*
|
||||
* call-seq:
|
||||
* method_removed(method_name)
|
||||
*
|
||||
* Invoked as a callback whenever an instance method is removed from the
|
||||
* receiver.
|
||||
*
|
||||
* module Chatty
|
||||
* def self.method_removed(method_name)
|
||||
* puts "Removing #{method_name.inspect}"
|
||||
* end
|
||||
* def self.some_class_method() end
|
||||
* def some_instance_method() end
|
||||
* class << self
|
||||
* remove_method :some_class_method
|
||||
* end
|
||||
* remove_method :some_instance_method
|
||||
* end
|
||||
*
|
||||
* produces:
|
||||
*
|
||||
* Removing :some_instance_method
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Document-method: singleton_method_added
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user