mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_method.c (rb_mod_method_defined): should return true or false.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ff54193c83
commit
bc7123e434
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Sep 25 11:51:34 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_method.c (rb_mod_method_defined): should return true or false.
|
||||
|
||||
Thu Sep 24 13:32:53 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* proc.c (mnew): generate method object that wraps method_missing,
|
||||
|
|
10
vm_method.c
10
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
|
||||
|
|
Loading…
Reference in a new issue