ruby-changes:27260
From: zzak <ko1@a...>
Date: Tue, 19 Feb 2013 12:32:35 +0900 (JST)
Subject: [ruby-changes:27260] zzak:r39312 (trunk): * object.c: rdoc formatting for Kernel#Array()
zzak 2013-02-19 12:32:11 +0900 (Tue, 19 Feb 2013) New Revision: 39312 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39312 Log: * object.c: rdoc formatting for Kernel#Array() * array.c: Add rdoc for Array() method to Creating Arrays section Modified files: trunk/ChangeLog trunk/array.c trunk/object.c Index: array.c =================================================================== --- array.c (revision 39311) +++ array.c (revision 39312) @@ -5240,6 +5240,11 @@ rb_ary_drop_while(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L5240 * empty_table = Array.new(3) { Array.new(3) } * #=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]] * + * An array can also be created by using the Array() method, provided by + * Kernel, which calls #to_ary or #to_a on it's argument. + * + * Array({:a => "a", :b => "b"}) #=> [[:a, "a"], [:b, "b"]] + * * == Example Usage * * In addition to the methods it mixes in through the Enumerable module, the Index: ChangeLog =================================================================== --- ChangeLog (revision 39311) +++ ChangeLog (revision 39312) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Feb 19 12:30:00 2013 Zachary Scott <zachary@z...> + + * object.c: rdoc formatting for Kernel#Array() + * array.c: Add rdoc for Array() method to Creating Arrays section + Tue Feb 19 10:35:52 2013 Eric Hodel <drbrain@s...> * ext/openssl/ossl.c (class OpenSSL): Use only inner parenthesis in Index: object.c =================================================================== --- object.c (revision 39311) +++ object.c (revision 39312) @@ -2727,8 +2727,9 @@ rb_Array(VALUE val) https://github.com/ruby/ruby/blob/trunk/object.c#L2727 * call-seq: * Array(arg) -> array * - * Returns <i>arg</i> as an <code>Array</code>. First tries to call - * <i>arg</i><code>.to_ary</code>, then <i>arg</i><code>.to_a</code>. + * Returns +arg+ as an Array. + * + * First tries to call Array#to_ary on +arg+, then Array#to_a. * * Array(1..5) #=> [1, 2, 3, 4, 5] */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/