= private = protected
between?(p1, p2)
Returns false if obj <=> min is less than zero or if anObject <=> max is greater than zero, true otherwise.
3.between?(1, 5) #=> true 6.between?(1, 5) #=> false 'cat'.between?('ant', 'dog') #=> true 'gnu'.between?('ant', 'dog') #=> false
static VALUE cmp_between(VALUE x, VALUE min, VALUE max) { if (RTEST(cmp_lt(x, min))) return Qfalse; if (RTEST(cmp_gt(x, max))) return Qfalse; return Qtrue; }