[前][次][番号順一覧][スレッド一覧]

ruby-changes:52661

From: kazu <ko1@a...>
Date: Fri, 28 Sep 2018 15:25:29 +0900 (JST)
Subject: [ruby-changes:52661] kazu:r64873 (trunk): Add Range#% to call-seq [ci skip]

kazu	2018-09-28 15:25:24 +0900 (Fri, 28 Sep 2018)

  New Revision: 64873

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64873

  Log:
    Add Range#% to call-seq [ci skip]

  Modified files:
    trunk/range.c
Index: range.c
===================================================================
--- range.c	(revision 64872)
+++ range.c	(revision 64873)
@@ -350,10 +350,14 @@ range_step_size(VALUE range, VALUE args, https://github.com/ruby/ruby/blob/trunk/range.c#L350
 }
 
 /*
+ *  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.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]