new(p1, p2, p3 = v3)
public
Constructs a range using the given start and end. If the third parameter is omitted or
is false, the range will include the end object; otherwise, it will be excluded.
Show source
static VALUE
range_initialize(int argc, VALUE *argv, VALUE range)
{
VALUE beg, end, flags;
rb_scan_args(argc, argv, "21", &beg, &end, &flags);
/* Ranges are immutable, so that they should be initialized only once. */
if (RANGE_EXCL(range) != Qnil) {
rb_name_error(rb_intern("initialize"), "`initialize' called twice");
}
range_init(range, beg, end, RTEST(flags));
return Qnil;
}