eql?(p1)
public
Returns true only if obj is a Range, has
equivalent beginning and end items (by
comparing them with #eql?), and has the
same #exclude_end? setting as
rng.
(0..2) == (0..2)
(0..2) == Range.new(0,2)
(0..2) == (0...2)
Show source
static VALUE
range_eql(VALUE range, VALUE obj)
{
if (range == obj)
return Qtrue;
if (!rb_obj_is_kind_of(obj, rb_cRange))
return Qfalse;
return rb_exec_recursive_paired(recursive_eql, range, obj, obj);
}