1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Using RBOOL in cmp_between func

This commit is contained in:
S-H-GAMELINKS 2022-06-14 21:49:24 +09:00 committed by Nobuyoshi Nakada
parent 1dfe007e16
commit 51a3ebf4ec
Notes: git 2022-06-17 12:00:10 +09:00

View file

@ -167,9 +167,7 @@ cmp_le(VALUE x, VALUE y)
static VALUE
cmp_between(VALUE x, VALUE min, VALUE max)
{
if (cmpint(x, min) < 0) return Qfalse;
if (cmpint(x, max) > 0) return Qfalse;
return Qtrue;
return RBOOL((cmpint(x, min) >= 0 && cmpint(x, max) <= 0));
}
/*