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:
kazu 2018-09-28 06:25:24 +00:00
Родитель f251ce9f48
Коммит 41aa841a52
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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.