From 28fb6d6b9e06a632f96244a635a045622a6be276 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 3 Dec 2021 07:12:28 -0600 Subject: Adding links to literals and Kernel (#5192) * Adding links to literals and Kernel --- range.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'range.c') diff --git a/range.c b/range.c index 6ac7d794c6..6eb7842313 100644 --- a/range.c +++ b/range.c @@ -2050,14 +2050,16 @@ range_count(int argc, VALUE *argv, VALUE range) /* A \Range object represents a collection of values * that are between given begin and end values. * - * A range may be created using a literal: - * - * # Ranges that use '..' to include the given end value. - * (1..4).to_a # => [1, 2, 3, 4] - * ('a'..'d').to_a # => ["a", "b", "c", "d"] - * # Ranges that use '...' to exclude the given end value. - * (1...4).to_a # => [1, 2, 3] - * ('a'...'d').to_a # => ["a", "b", "c"] + * You can create an \Range object explicitly with: + * + * - A {range literal}[doc/syntax/literals_rdoc.html#label-Range+Literals]: + * + * # Ranges that use '..' to include the given end value. + * (1..4).to_a # => [1, 2, 3, 4] + * ('a'..'d').to_a # => ["a", "b", "c", "d"] + * # Ranges that use '...' to exclude the given end value. + * (1...4).to_a # => [1, 2, 3] + * ('a'...'d').to_a # => ["a", "b", "c"] * * A range may be created using method Range.new: * -- cgit v1.2.3