summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-12 02:59:07 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-12 02:59:07 +0000
commit9ef4e13459c95922e7384194c90b91bf67dd785a (patch)
treee1bc78edb68a8498dd459df0e72abb9c5280c201
parentc37d5e7c778cad02c606cd90992743e8bb4a0185 (diff)
* array.c: Document synonymous methods, by windwiny [GH-277]
* bignum.c: ditto * complex.c: ditto * dir.c: ditto * encoding.c: ditto * enumerator.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * string.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog13
-rw-r--r--array.c3
-rw-r--r--bignum.c1
-rw-r--r--complex.c1
-rw-r--r--dir.c3
-rw-r--r--encoding.c1
-rw-r--r--enumerator.c3
-rw-r--r--numeric.c1
-rw-r--r--proc.c1
-rw-r--r--re.c1
-rw-r--r--string.c6
11 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c42fcfa11..9a7feef0e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Fri Apr 12 11:58:00 2013 Zachary Scott <zachary@zacharyscott.net>
+
+ * array.c: Document synonymous methods, by windwiny [GH-277]
+ * bignum.c: ditto
+ * complex.c: ditto
+ * dir.c: ditto
+ * encoding.c: ditto
+ * enumerator.c: ditto
+ * numeric.c: ditto
+ * proc.c: ditto
+ * re.c: ditto
+ * string.c: ditto
+
Thu Apr 11 23:41:46 2013 Tanaka Akira <akr@fsij.org>
* common.mk: Add dependencies for include/ruby.h
diff --git a/array.c b/array.c
index 2646e904e7..0a2be58fcd 100644
--- a/array.c
+++ b/array.c
@@ -1320,6 +1320,9 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
+ * ary.find_index(obj) -> int or nil
+ * ary.find_index { |item| block } -> int or nil
+ * ary.find_index -> Enumerator
* ary.index(obj) -> int or nil
* ary.index { |item| block } -> int or nil
* ary.index -> Enumerator
diff --git a/bignum.c b/bignum.c
index e709c21c52..6236ff32f7 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3782,6 +3782,7 @@ rb_big_coerce(VALUE x, VALUE y)
/*
* call-seq:
* big.abs -> aBignum
+ * big.magnitude -> aBignum
*
* Returns the absolute value of <i>big</i>.
*
diff --git a/complex.c b/complex.c
index f6f63f6ebd..19c20b3565 100644
--- a/complex.c
+++ b/complex.c
@@ -2018,6 +2018,7 @@ numeric_arg(VALUE self)
/*
* call-seq:
* num.rect -> array
+ * num.rectangular -> array
*
* Returns an array; [num, 0].
*/
diff --git a/dir.c b/dir.c
index a069bb34df..e4c53fd607 100644
--- a/dir.c
+++ b/dir.c
@@ -544,6 +544,7 @@ dir_inspect(VALUE dir)
/*
* call-seq:
* dir.path -> string or nil
+ * dir.to_path -> string or nil
*
* Returns the path parameter passed to <em>dir</em>'s constructor.
*
@@ -732,7 +733,7 @@ dir_seek(VALUE dir, VALUE pos)
/*
* call-seq:
- * dir.pos( integer ) -> integer
+ * dir.pos = integer -> integer
*
* Synonym for <code>Dir#seek</code>, but returns the position
* parameter.
diff --git a/encoding.c b/encoding.c
index 0c92dfedef..3d89d52ea6 100644
--- a/encoding.c
+++ b/encoding.c
@@ -992,6 +992,7 @@ enc_inspect(VALUE self)
/*
* call-seq:
* enc.name -> string
+ * enc.to_s -> string
*
* Returns the name of the encoding.
*
diff --git a/enumerator.c b/enumerator.c
index 3aa0d2ea78..44c574728b 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -526,6 +526,8 @@ enumerator_with_object_i(VALUE val, VALUE memo, int argc, VALUE *argv)
/*
* call-seq:
+ * e.each_with_object(obj) {|(*args), obj| ... }
+ * e.each_with_object(obj)
* e.with_object(obj) {|(*args), obj| ... }
* e.with_object(obj)
*
@@ -1501,6 +1503,7 @@ lazy_flat_map_func(VALUE val, VALUE m, int argc, VALUE *argv)
/*
* call-seq:
+ * lazy.collect_concat { |obj| block } -> a_lazy_enumerator
* lazy.flat_map { |obj| block } -> a_lazy_enumerator
*
* Returns a new lazy enumerator with the concatenated results of running
diff --git a/numeric.c b/numeric.c
index d142c67138..5e353da7c1 100644
--- a/numeric.c
+++ b/numeric.c
@@ -853,6 +853,7 @@ flo_div(VALUE x, VALUE y)
/*
* call-seq:
+ * float.fdiv(numeric) -> float
* float.quo(numeric) -> float
*
* Returns float / numeric.
diff --git a/proc.c b/proc.c
index 4596003daf..9d083df269 100644
--- a/proc.c
+++ b/proc.c
@@ -1052,6 +1052,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope)
/*
* call-seq:
+ * meth.eql?(other_meth) -> true or false
* meth == other_meth -> true or false
*
* Two method objects are equal if they are bound to the same
diff --git a/re.c b/re.c
index 16d7e3450c..fe7e3903b5 100644
--- a/re.c
+++ b/re.c
@@ -2643,6 +2643,7 @@ match_hash(VALUE match)
/*
* call-seq:
* mtch == mtch2 -> true or false
+ * mtch.eql?(mtch2) -> true or false
*
* Equality---Two matchdata are equal if their target strings,
* patterns, and matched positions are identical.
diff --git a/string.c b/string.c
index 8b85739e70..d9a91b5a6f 100644
--- a/string.c
+++ b/string.c
@@ -8032,6 +8032,7 @@ sym_casecmp(VALUE sym, VALUE other)
/*
* call-seq:
* sym =~ obj -> fixnum or nil
+ * sym.match(obj) -> fixnum or nil
*
* Returns <code>sym.to_s =~ obj</code>.
*/
@@ -8045,7 +8046,9 @@ sym_match(VALUE sym, VALUE other)
/*
* call-seq:
* sym[idx] -> char
- * sym[b, n] -> char
+ * sym[b, n] -> string
+ * sym.slice(idx) -> char
+ * sym.slice(b, n) -> string
*
* Returns <code>sym.to_s[]</code>.
*/
@@ -8059,6 +8062,7 @@ sym_aref(int argc, VALUE *argv, VALUE sym)
/*
* call-seq:
* sym.length -> integer
+ * sym.size -> integer
*
* Same as <code>sym.to_s.length</code>.
*/