Using RBOOL in cmp_between func
This commit is contained in:
parent
1dfe007e16
commit
51a3ebf4ec
Notes:
git
2022-06-17 12:00:10 +09:00
4
compar.c
4
compar.c
|
@ -167,9 +167,7 @@ cmp_le(VALUE x, VALUE y)
|
||||||
static VALUE
|
static VALUE
|
||||||
cmp_between(VALUE x, VALUE min, VALUE max)
|
cmp_between(VALUE x, VALUE min, VALUE max)
|
||||||
{
|
{
|
||||||
if (cmpint(x, min) < 0) return Qfalse;
|
return RBOOL((cmpint(x, min) >= 0 && cmpint(x, max) <= 0));
|
||||||
if (cmpint(x, max) > 0) return Qfalse;
|
|
||||||
return Qtrue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue