summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-01 15:41:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-01 17:02:04 +0900
commit069cca6f7459da5cc502d0c51f60a9813c611b31 (patch)
treee33986c53af62142b310b187fdf50abea2aa5203 /vm_method.c
parent77ee47188efc64fe8b508494e9b11e8ed481d33c (diff)
downloadruby-069cca6f7459da5cc502d0c51f60a9813c611b31.tar.gz
Negative RBOOL usage
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 38d03fbe2b..6867b5cf8c 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -2678,7 +2678,7 @@ basic_obj_respond_to(rb_execution_context_t *ec, VALUE obj, ID id, int pub)
return FALSE;
case 0:
ret = basic_obj_respond_to_missing(ec, klass, obj, ID2SYM(id),
- pub ? Qfalse : Qtrue);
+ RBOOL(!pub));
return RTEST(ret) && ret != Qundef;
default:
return TRUE;