mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add Range#% to call-seq [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f251ce9f48
commit
41aa841a52
1 changed files with 4 additions and 0 deletions
4
range.c
4
range.c
|
@ -350,10 +350,14 @@ range_step_size(VALUE range, VALUE args, VALUE eobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* Document-method: Range#step
|
||||||
|
* Document-method: Range#%
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* rng.step(n=1) {| obj | block } -> rng
|
* rng.step(n=1) {| obj | block } -> rng
|
||||||
* rng.step(n=1) -> an_enumerator
|
* rng.step(n=1) -> an_enumerator
|
||||||
* rng.step(n=1) -> an_arithmetic_sequence
|
* 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.
|
* 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.
|
* If begin and end are numeric, +n+ is added for each iteration.
|
||||||
|
|
Loading…
Add table
Reference in a new issue