diff --git a/ChangeLog b/ChangeLog index 81c01fc96e..cb1a8d857c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 25 11:51:34 2009 Nobuyoshi Nakada + + * vm_method.c (rb_mod_method_defined): should return true or false. + Thu Sep 24 13:32:53 2009 Yukihiro Matsumoto * proc.c (mnew): generate method object that wraps method_missing, diff --git a/vm_method.c b/vm_method.c index 2be0a9603f..f2d2cd3c75 100644 --- a/vm_method.c +++ b/vm_method.c @@ -671,7 +671,11 @@ rb_mod_undef_method(int argc, VALUE *argv, VALUE mod) static VALUE rb_mod_method_defined(VALUE mod, VALUE mid) { - return rb_method_boundp(mod, rb_to_id(mid), 1); + if (!rb_method_boundp(mod, rb_to_id(mid), 1)) { + return FALSE; + } + return TRUE; + } #define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f)) @@ -1123,9 +1127,9 @@ basic_obj_respond_to(VALUE obj, ID id, int pub) if (!rb_method_basic_definition_p(klass, respond_to_missing)) { return RTEST(rb_funcall(obj, respond_to_missing, pub ? 1 : 2, ID2SYM(id), Qtrue)); } - return Qfalse; + return FALSE; } - return Qtrue; + return TRUE; } int