aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-16 08:03:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-16 08:03:42 +0000
commit3a206c91247dc85ab2f9d08875757347812214de (patch)
tree1a15889aa5905b59064fedde7deb2c86e6240e1e /vm_method.c
parentfd444f90b5ec99c8081222d91a6e8d172e617bb9 (diff)
downloadruby-3a206c91247dc85ab2f9d08875757347812214de.tar.gz
vm_method.c: no RTEST on mere flag
* vm_method.c (basic_obj_respond_to): `priv` is not a VALUE but a mere flag, so cannot call RTEST() on it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 3095ac279f..bb1b129544 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1624,7 +1624,7 @@ rb_obj_respond_to(VALUE obj, ID id, int priv)
VALUE klass = CLASS_OF(obj);
if (rb_method_basic_definition_p(klass, idRespond_to)) {
- return basic_obj_respond_to(obj, id, !RTEST(priv));
+ return basic_obj_respond_to(obj, id, !priv);
}
else {
int argc = 1;