Project

General

Profile

Bug #5656 ยป 02-group-documentation-by-removing-range_eqq.patch

zetter (Chris Zetter), 11/22/2011 08:08 AM

View differences:

range.c (working copy)
816 816
    return rb_exec_recursive(inspect_range, range, 0);
817 817
}
818 818

  
819
/*
820
 *  call-seq:
821
 *     rng === obj       ->  true or false
822
 *
823
 *  Returns <code>true</code> if +obj+ is an element of
824
 *  the range, <code>false</code> otherwise.
825
 */
826 819

  
827
static VALUE
828
range_eqq(VALUE range, VALUE val)
829
{
830
    return rb_funcall(range, rb_intern("include?"), 1, val);
831
}
832

  
833

  
834 820
/*
835 821
 *  call-seq:
822
 *     rng === obj       ->  true or false
836 823
 *     rng.member?(obj)  ->  true or false
837 824
 *     rng.include?(obj) ->  true or false
838 825
 *
......
1057 1044
    rb_define_method(rb_cRange, "initialize", range_initialize, -1);
1058 1045
    rb_define_method(rb_cRange, "initialize_copy", range_initialize_copy, 1);
1059 1046
    rb_define_method(rb_cRange, "==", range_eq, 1);
1060
    rb_define_method(rb_cRange, "===", range_eqq, 1);
1047
    rb_define_method(rb_cRange, "===", range_include, 1);
1061 1048
    rb_define_method(rb_cRange, "eql?", range_eql, 1);
1062 1049
    rb_define_method(rb_cRange, "hash", range_hash, 0);
1063 1050
    rb_define_method(rb_cRange, "each", range_each, 0);