summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'range.c')
-rw-r--r--range.c18
1 files changed, 10 insertions, 8 deletions
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:
*