aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 08:51:34 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-12 08:51:34 +0000
commit98fa0ab4d955cf275ceb15573a5d40edd2e82522 (patch)
tree79aa018e750ae1bf589aee9b4ec5e2947e3698ff /numeric.c
parent1595421ce0ab3cc943a22e7fef6a2294540fff20 (diff)
downloadruby-98fa0ab4d955cf275ceb15573a5d40edd2e82522.tar.gz
[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 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index ef72491987..da0bad3211 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2654,9 +2654,11 @@ num_step_size(VALUE from, VALUE args, VALUE eobj)
/*
* call-seq:
* num.step(by: step, to: limit) {|i| block } -> self
- * num.step(by: step, to: limit) -> an_enumerator
+ * num.step(by: step, to: limit) -> an_enumerator
+ * num.step(by: step, to: limit) -> an_arithmetic_sequence
* num.step(limit=nil, step=1) {|i| block } -> self
* num.step(limit=nil, step=1) -> an_enumerator
+ * num.step(limit=nil, step=1) -> an_arithmetic_sequence
*
* Invokes the given block with the sequence of numbers starting at +num+,
* incremented by +step+ (defaulted to +1+) on each call.
@@ -2685,6 +2687,8 @@ num_step_size(VALUE from, VALUE args, VALUE eobj)
* and increments itself using the <code>+</code> operator.
*
* If no block is given, an Enumerator is returned instead.
+ * Especially, the enumerator is an Enumerator::ArithmeticSequence
+ * if both +limit+ and +step+ are kind of Numeric or <code>nil</code>.
*
* For example:
*