mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
RBOOL is unnecessary in C boolean context
Fix a `-Wint-in-bool-context` warning.
```
proc.c:688:33: warning: '?:' using integer constants in boolean context [-Wint-in-bool-context]
688 | if (RBOOL(get_local_variable_ptr(&env, idItImplicit, FALSE))) {
```
This commit is contained in:
parent
74b18b5382
commit
85ff21c9e5
Notes:
git
2025-12-18 07:42:47 +00:00
2
proc.c
2
proc.c
@ -685,7 +685,7 @@ bind_implicit_parameters(VALUE bindval)
|
||||
GetBindingPtr(bindval, bind);
|
||||
env = VM_ENV_ENVVAL_PTR(vm_block_ep(&bind->block));
|
||||
|
||||
if (RBOOL(get_local_variable_ptr(&env, idItImplicit, FALSE))) {
|
||||
if (get_local_variable_ptr(&env, idItImplicit, FALSE)) {
|
||||
return rb_ary_new_from_args(1, ID2SYM(idIt));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user