ruby-changes:46508
From: nagachika <ko1@a...>
Date: Tue, 9 May 2017 23:53:48 +0900 (JST)
Subject: [ruby-changes:46508] nagachika:r58629 (ruby_2_4): merge revision(s) 58037: [Backport #10944]
nagachika 2017-05-09 23:53:44 +0900 (Tue, 09 May 2017) New Revision: 58629 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58629 Log: merge revision(s) 58037: [Backport #10944] docs for creating arrays * array.c: [DOC] add example for Array.new with block and index. Reported by Don Cruickshank. [ruby-core:68442] [Bug #10944] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/array.c branches/ruby_2_4/version.h Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 58628) +++ ruby_2_4/version.h (revision 58629) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.2" #define RUBY_RELEASE_DATE "2017-05-09" -#define RUBY_PATCHLEVEL 123 +#define RUBY_PATCHLEVEL 124 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 5 Index: ruby_2_4/array.c =================================================================== --- ruby_2_4/array.c (revision 58628) +++ ruby_2_4/array.c (revision 58629) @@ -5883,7 +5883,8 @@ rb_ary_sum(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/array.c#L5883 * This method is safe to use with mutable objects such as hashes, strings or * other arrays: * - * Array.new(4) { Hash.new } #=> [{}, {}, {}, {}] + * Array.new(4) { Hash.new } #=> [{}, {}, {}, {}] + * Array.new(4) {|i| i.to_s } #=> ["0", "1", "2", "3"] * * This is also a quick way to build up multi-dimensional arrays: * Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 58628) +++ ruby_2_4 (revision 58629) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r58037 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/