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 + + * 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 * 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 big. * 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 dir's constructor. * @@ -732,7 +733,7 @@ dir_seek(VALUE dir, VALUE pos) /* * call-seq: - * dir.pos( integer ) -> integer + * dir.pos = integer -> integer * * Synonym for Dir#seek, 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 sym.to_s =~ obj. */ @@ -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 sym.to_s[]. */ @@ -8059,6 +8062,7 @@ sym_aref(int argc, VALUE *argv, VALUE sym) /* * call-seq: * sym.length -> integer + * sym.size -> integer * * Same as sym.to_s.length. */