aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-01 01:35:43 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-01 01:35:43 +0000
commit396d835d098e39efec080a22d4b5102c5084819f (patch)
tree561ae8c7ea100235c9bba7854b070ddc62f30e38
parent215a3894d09ed4ff8762e2ba3f98e938f5c20583 (diff)
downloadruby-396d835d098e39efec080a22d4b5102c5084819f.tar.gz
[DOC] merge documents for {Integer,Fixnum}#succ.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--numeric.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/numeric.c b/numeric.c
index a357c3af3c..ed34a0d2ec 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2935,6 +2935,10 @@ int_even_p(VALUE num)
}
/*
+ * 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)
*
* 1.next #=> 2
* (-1).next #=> 0
+ * 1.succ #=> 2
+ * (-1).succ #=> 0
*/
static VALUE
@@ -2952,17 +2958,6 @@ fix_succ(VALUE num)
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)
{