/* Range.new( start, end, exclusive=false ) -> aRange * ---- * 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. */ static VALUE range_initialize(argc, argv, obj) int argc; VALUE *argv; VALUE obj; { VALUE beg, end, flag; rb_scan_args(argc, argv, "21", &beg, &end, &flag); /* Ranges are immutable, so that they should be initialized only once. */ if (rb_ivar_defined(obj, id_beg)) { rb_raise(rb_eNameError, "`initialize' called twice"); } range_init(obj, beg, end, RTEST(flag)); return Qnil; }