MODIFIED: correct a mistake with rb_define_singleton_method