ruby-changes:34002
From: zzak <ko1@a...>
Date: Sun, 25 May 2014 06:30:52 +0900 (JST)
Subject: [ruby-changes:34002] zzak:r46083 (trunk): * array.c: [DOC] Clarify default argument for Array.new.
zzak 2014-05-25 06:30:42 +0900 (Sun, 25 May 2014) New Revision: 46083 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46083 Log: * array.c: [DOC] Clarify default argument for Array.new. By @Elffers [Fixes GH-610] [ci skip] Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 46082) +++ array.c (revision 46083) @@ -671,16 +671,16 @@ rb_ary_s_try_convert(VALUE dummy, VALUE https://github.com/ruby/ruby/blob/trunk/array.c#L671 /* * call-seq: - * Array.new(size=0, obj=nil) + * Array.new(size=0, default=nil) * Array.new(array) * Array.new(size) {|index| block } * * Returns a new array. * * In the first form, if no arguments are sent, the new array will be empty. - * When a +size+ and an optional +obj+ are sent, an array is created with - * +size+ copies of +obj+. Take notice that all elements will reference the - * same object +obj+. + * When a +size+ and an optional +default+ are sent, an array is created with + * +size+ copies of +default+. Take notice that all elements will reference the + * same object +default+. * * The second form creates a copy of the array passed as a parameter (the * array is generated by calling to_ary on the parameter). Index: ChangeLog =================================================================== --- ChangeLog (revision 46082) +++ ChangeLog (revision 46083) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun May 25 06:29:39 2014 Zachary Scott <e@z...> + + * array.c: [DOC] Clarify default argument for Array.new. + By @Elffers [Fixes GH-610] + Sat May 24 22:37:20 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> * array.c: [DOC] Add more documents to shuffle! and shuffle. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/