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

ruby-changes:42787

From: akr <ko1@a...>
Date: Sun, 1 May 2016 09:39:11 +0900 (JST)
Subject: [ruby-changes:42787] akr:r54861 (trunk): [DOC] merge documents for {Integer, Fixnum}#succ.

akr	2016-05-01 10:35:43 +0900 (Sun, 01 May 2016)

  New Revision: 54861

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

  Log:
    [DOC] merge documents for {Integer,Fixnum}#succ.

  Modified files:
    trunk/numeric.c
Index: numeric.c
===================================================================
--- numeric.c	(revision 54860)
+++ numeric.c	(revision 54861)
@@ -2935,6 +2935,10 @@ int_even_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L2935
 }
 
 /*
+ *  Document-method: Integer#succ
+ *  Document-method: Integer#next
+ *  Document-method: Fixnum#succ
+ *  Document-method: Fixnum#next
  *  call-seq:
  *     int.next  ->  integer
  *     int.succ  ->  integer
@@ -2943,6 +2947,8 @@ int_even_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L2947
  *
  *     1.next      #=> 2
  *     (-1).next   #=> 0
+ *     1.succ      #=> 2
+ *     (-1).succ   #=> 0
  */
 
 static VALUE
@@ -2952,17 +2958,6 @@ fix_succ(VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L2958
     return LONG2NUM(i);
 }
 
-/*
- *  call-seq:
- *     int.next  ->  integer
- *     int.succ  ->  integer
- *
- *  Returns the Integer equal to +int+ + 1, same as Fixnum#next.
- *
- *     1.next      #=> 2
- *     (-1).next   #=> 0
- */
-
 VALUE
 rb_int_succ(VALUE num)
 {

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

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