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

ruby-changes:28207

From: zzak <ko1@a...>
Date: Fri, 12 Apr 2013 11:59:21 +0900 (JST)
Subject: [ruby-changes:28207] zzak:r40259 (trunk): * array.c: Document synonymous methods, by windwiny [GH-277]

zzak	2013-04-12 11:59:07 +0900 (Fri, 12 Apr 2013)

  New Revision: 40259

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40259

  Log:
    * 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

  Modified files:
    trunk/ChangeLog
    trunk/array.c
    trunk/bignum.c
    trunk/complex.c
    trunk/dir.c
    trunk/encoding.c
    trunk/enumerator.c
    trunk/numeric.c
    trunk/proc.c
    trunk/re.c
    trunk/string.c

Index: complex.c
===================================================================
--- complex.c	(revision 40258)
+++ complex.c	(revision 40259)
@@ -2018,6 +2018,7 @@ numeric_arg(VALUE self) https://github.com/ruby/ruby/blob/trunk/complex.c#L2018
 /*
  * call-seq:
  *    num.rect  ->  array
+ *    num.rectangular  ->  array
  *
  * Returns an array; [num, 0].
  */
Index: array.c
===================================================================
--- array.c	(revision 40258)
+++ array.c	(revision 40259)
@@ -1320,6 +1320,9 @@ rb_ary_fetch(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/array.c#L1320
 
 /*
  *  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
Index: encoding.c
===================================================================
--- encoding.c	(revision 40258)
+++ encoding.c	(revision 40259)
@@ -992,6 +992,7 @@ enc_inspect(VALUE self) https://github.com/ruby/ruby/blob/trunk/encoding.c#L992
 /*
  * call-seq:
  *   enc.name -> string
+ *   enc.to_s -> string
  *
  * Returns the name of the encoding.
  *
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40258)
+++ ChangeLog	(revision 40259)
@@ -1,3 +1,16 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 12 11:58:00 2013  Zachary Scott  <zachary@z...>
+
+	* 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@f...>
 
 	* common.mk: Add dependencies for include/ruby.h
Index: re.c
===================================================================
--- re.c	(revision 40258)
+++ re.c	(revision 40259)
@@ -2643,6 +2643,7 @@ match_hash(VALUE match) https://github.com/ruby/ruby/blob/trunk/re.c#L2643
 /*
  * 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.
Index: enumerator.c
===================================================================
--- enumerator.c	(revision 40258)
+++ enumerator.c	(revision 40259)
@@ -526,6 +526,8 @@ enumerator_with_object_i(VALUE val, VALU https://github.com/ruby/ruby/blob/trunk/enumerator.c#L526
 
 /*
  * 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, i https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1503
 
 /*
  *  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
Index: string.c
===================================================================
--- string.c	(revision 40258)
+++ string.c	(revision 40259)
@@ -8032,6 +8032,7 @@ sym_casecmp(VALUE sym, VALUE other) https://github.com/ruby/ruby/blob/trunk/string.c#L8032
 /*
  * 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) https://github.com/ruby/ruby/blob/trunk/string.c#L8046
 /*
  * 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 sy https://github.com/ruby/ruby/blob/trunk/string.c#L8062
 /*
  * call-seq:
  *   sym.length    -> integer
+ *   sym.size    -> integer
  *
  * Same as <code>sym.to_s.length</code>.
  */
Index: proc.c
===================================================================
--- proc.c	(revision 40258)
+++ proc.c	(revision 40259)
@@ -1052,6 +1052,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALU https://github.com/ruby/ruby/blob/trunk/proc.c#L1052
 
 /*
  * 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
Index: dir.c
===================================================================
--- dir.c	(revision 40258)
+++ dir.c	(revision 40259)
@@ -544,6 +544,7 @@ dir_inspect(VALUE dir) https://github.com/ruby/ruby/blob/trunk/dir.c#L544
 /*
  *  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) https://github.com/ruby/ruby/blob/trunk/dir.c#L733
 
 /*
  *  call-seq:
- *     dir.pos( integer ) -> integer
+ *     dir.pos = integer  -> integer
  *
  *  Synonym for <code>Dir#seek</code>, but returns the position
  *  parameter.
Index: numeric.c
===================================================================
--- numeric.c	(revision 40258)
+++ numeric.c	(revision 40259)
@@ -853,6 +853,7 @@ flo_div(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L853
 
 /*
  *  call-seq:
+ *     float.fdiv(numeric)  ->  float
  *     float.quo(numeric)  ->  float
  *
  *  Returns float / numeric.
Index: bignum.c
===================================================================
--- bignum.c	(revision 40258)
+++ bignum.c	(revision 40259)
@@ -3782,6 +3782,7 @@ rb_big_coerce(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L3782
 /*
  *  call-seq:
  *     big.abs -> aBignum
+ *     big.magnitude -> aBignum
  *
  *  Returns the absolute value of <i>big</i>.
  *

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

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