summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-25 02:51:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-25 02:51:36 +0000
commitbc7123e4346c373dcf428fa67caef4dc07a199c9 (patch)
tree6492601d1c36b74c892b760537588e7bb1a31259 /vm_method.c
parentff54193c835c97bebe5e6026a05a622ca5852071 (diff)
* 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
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c10
1 files changed, 7 insertions, 3 deletions
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