From: KDr2 Date: 2009-05-07T16:15:50+09:00 Subject: Re: Adding a =~ method to the Method class --001636e911c20f24e904694d48bb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit *ruby-1.8.7-p160* add to *eval.c,* after line *9323*: static VALUE method_similar(method, other) VALUE method, other; { struct METHOD *m1, *m2; if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark) return Qfalse; if (CLASS_OF(method) != CLASS_OF(other)) return Qfalse; Data_Get_Struct(method, struct METHOD, m1); Data_Get_Struct(other, struct METHOD, m2); if (m1->klass != m2->klass || m1->rklass != m2->rklass ||m1->body != m2->body) return Qfalse; return Qtrue; } add to *eval.c* affter line *10046*: rb_define_method(rb_cMethod, "=~", method_similar, 1); On Thu, May 7, 2009 at 3:02 PM, Gabriel Saravia wrote: > CLASS_OF(method) -- Best Regards, -- KDr2, at x-macro.com. --001636e911c20f24e904694d48bb--