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:
parent
1dfe007e16
commit
51a3ebf4ec
Notes:
git
2022-06-17 12:00:10 +09:00
1 changed files with 1 additions and 3 deletions
4
compar.c
4
compar.c
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue