End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
BasicObject#singleton_method_undefined
singleton_method_undefined(p1)
object.c
View on GitHub ↗
static VALUE
rb_obj_dummy1(VALUE _x, VALUE _y)
{
return rb_obj_dummy();
}
Alias of #singleton_method_added
Invoked as a callback whenever a singleton method is added to the receiver.
Example
module Chatty def Chatty.singleton_method_added(id) puts "Adding #{id.id2name}" end def self.one() end def two() end def Chatty.three() end end
produces:
Example
Adding singleton_method_added Adding one Adding three
See also
#singleton_method_added
#singleton_method_removed
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1