ruby-changes:27401
From: zzak <ko1@a...>
Date: Sun, 24 Feb 2013 13:48:39 +0900 (JST)
Subject: [ruby-changes:27401] zzak:r39454 (ruby_2_0_0): * object.c: rdoc formatting for Kernel#Array() [Backport #7931]
zzak 2013-02-24 13:45:37 +0900 (Sun, 24 Feb 2013) New Revision: 39454 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39454 Log: * object.c: rdoc formatting for Kernel#Array() [Backport #7931] * array.c: Add rdoc for Array() method to Creating Arrays section Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/array.c branches/ruby_2_0_0/object.c Index: ruby_2_0_0/array.c =================================================================== --- ruby_2_0_0/array.c (revision 39453) +++ ruby_2_0_0/array.c (revision 39454) @@ -5240,6 +5240,11 @@ rb_ary_drop_while(VALUE ary) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/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: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 39453) +++ ruby_2_0_0/ChangeLog (revision 39454) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Tue Feb 19 12:30:00 2013 Zachary Scott <zachary@z...> + + * object.c: rdoc formatting for Kernel#Array() [Backport #7931] + * array.c: Add rdoc for Array() method to Creating Arrays section + Sat Feb 23 16:51:00 2013 Zachary Scott <zachary@z...> * thread.c: Documentation for Thread#backtrace_locations Index: ruby_2_0_0/object.c =================================================================== --- ruby_2_0_0/object.c (revision 39453) +++ ruby_2_0_0/object.c (revision 39454) @@ -2747,8 +2747,9 @@ rb_Array(VALUE val) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/object.c#L2747 * 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/