diff --git a/range.c b/range.c index 07008cad97..9661feb718 100644 --- a/range.c +++ b/range.c @@ -1360,15 +1360,16 @@ static int r_cover_range_p(VALUE range, VALUE beg, VALUE end, VALUE val); * This tests begin <= obj <= end when #exclude_end? is +false+ * and begin <= obj < end when #exclude_end? is +true+. * - * Returns true for a Range when it is covered by the reciver, + * If called with a Range argument, returns true when the + * given range is covered by the receiver, * by comparing the begin and end values. If the argument can be treated as * a sequence, this method treats it that way. In the specific case of * (a..b).cover?(c...d) with a <= c && b < d, - * end of sequence must be calculated, which may exhibit poor performance if - * c is non-numeric. Returns false if the begin value of the - * Range is larger than the end value. + * the end of the sequence must be calculated, which may exhibit poor + * performance if c is non-numeric. + * Returns false if the begin value of the + * range is larger than the end value. * - * Return * ("a".."z").cover?("c") #=> true * ("a".."z").cover?("5") #=> false * ("a".."z").cover?("cc") #=> true