summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 08:51:34 (GMT)
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 08:51:34 (GMT)
commit98fa0ab4d955cf275ceb15573a5d40edd2e82522 (patch)
tree79aa018e750ae1bf589aee9b4ec5e2947e3698ff /range.c
parent1595421ce0ab3cc943a22e7fef6a2294540fff20 (diff)
[DOC] Modify descriptions for ArithmeticSequence
[ci-skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/range.c b/range.c
index 2763b32..d781af3 100644
--- a/range.c
+++ b/range.c
@@ -353,6 +353,7 @@ range_step_size(VALUE range, VALUE args, VALUE eobj)
* call-seq:
* rng.step(n=1) {| obj | block } -> rng
* rng.step(n=1) -> an_enumerator
+ * rng.step(n=1) -> an_arithmetic_sequence
*
* Iterates over the range, passing each <code>n</code>th element to the block.
* If begin and end are numeric, +n+ is added for each iteration.
@@ -360,6 +361,8 @@ range_step_size(VALUE range, VALUE args, VALUE eobj)
* range elements.
*
* If no block is given, an enumerator is returned instead.
+ * Especially, the enumerator is an Enumerator::ArithmeticSequence
+ * if begin and end of the range are numeric.
*
* range = Xs.new(1)..Xs.new(10)
* range.step(2) {|x| puts x}