Why doesn't rb_define_singleton_method call singleton_method_added?

[pbrannan@zaphod testsing]$ cat testsing.c
#include <ruby.h>

VALUE foo(VALUE self)
{
return Qnil;
}

void Init_testsing()
{
VALUE rb_mFoo = rb_const_get(rb_cObject, rb_intern(“Foo”));
rb_define_singleton_method(rb_mFoo, “foo”, foo, 0);
}

[pbrannan@zaphod testsing]$ cat testsing.rb
module Foo
def self.singleton_method_added(id)
p id
end
end

require ‘testsing.so

module Foo
def self.bar
end
end

[pbrannan@zaphod testsing]$ ruby testsing.rb
:singleton_method_added
:bar
[pbrannan@zaphod testsing]$ ruby -v
ruby 1.6.8 (2002-12-24) [i686-linux]

[pbrannan@zaphod testsing]$ ruby-1.7 testsing.rb
:singleton_method_added
:bar
[pbrannan@zaphod testsing]$ ruby-1.7 -v
ruby 1.8.0 (2003-05-01) [i686-linux]

Hi,

···

In message “Why doesn’t rb_define_singleton_method call singleton_method_added?” on 03/05/02, Paul Brannan pbrannan@atdesk.com writes:

Because no one had ever requested. I’m often demand driven.

						matz.

I’d like to request it, then :slight_smile:

(along with any other callbacks for method definitions that may be
missing).

Paul

···

On Fri, May 02, 2003 at 11:24:39AM +0900, Yukihiro Matsumoto wrote:

Hi,

In message “Why doesn’t rb_define_singleton_method call singleton_method_added?” > on 03/05/02, Paul Brannan pbrannan@atdesk.com writes:

Because no one had ever requested. I’m often demand driven.

Hi,

···

In message “Re: Why doesn’t rb_define_singleton_method call singleton_method_added?” on 03/05/02, Paul Brannan pbrannan@atdesk.com writes:

Because no one had ever requested. I’m often demand driven.

I’d like to request it, then :slight_smile:

(along with any other callbacks for method definitions that may be
missing).

Done.

						matz.