Negative RBOOL usage

This commit is contained in:
Nobuyoshi Nakada 2022-01-01 15:41:00 +09:00
parent 77ee47188e
commit 069cca6f74
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2022-01-01 18:54:15 +09:00
9 changed files with 14 additions and 14 deletions

View file

@ -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;