summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-28 06:25:24 (GMT)
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-28 06:25:24 (GMT)
commit41aa841a526c54278a5a60b2af22d86ff805573f (patch)
tree340150fe032ff8c4d5e8ab391d4c19e648b540ad /range.c
parentf251ce9f48e7bfb8a5f72f12c8c00d0b6a137899 (diff)
Add Range#% to call-seq [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/range.c b/range.c
index 297303b..108c10a 100644
--- a/range.c
+++ b/range.c
@@ -350,10 +350,14 @@ range_step_size(VALUE range, VALUE args, VALUE eobj)
}
/*
+ * Document-method: Range#step
+ * Document-method: Range#%
* call-seq:
* rng.step(n=1) {| obj | block } -> rng
* rng.step(n=1) -> an_enumerator
* rng.step(n=1) -> an_arithmetic_sequence
+ * rng % n -> an_enumerator
+ * rng % n -> 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.