Method: Range#exclude_end?

Defined in:
range.c

#exclude_end?Boolean

Returns true if self excludes its end value; false otherwise:

Range.new(2, 5).exclude_end?       # => false
Range.new(2, 5, true).exclude_end? # => true
(2..5).exclude_end?                # => false
(2...5).exclude_end?               # => true

Returns:

  • (Boolean)


133
134
135
136
137
# File 'range.c', line 133

static VALUE
range_exclude_end_p(VALUE range)
{
    return RBOOL(EXCL(range));
}