[前][次][番号順一覧][スレッド一覧]

ruby-changes:46058

From: usa <ko1@a...>
Date: Sun, 26 Mar 2017 03:55:48 +0900 (JST)
Subject: [ruby-changes:46058] usa:r58129 (ruby_2_2): merge revision(s) 58037: [Backport #10944]

usa	2017-03-26 03:55:45 +0900 (Sun, 26 Mar 2017)

  New Revision: 58129

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58129

  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_2/
  Modified files:
    branches/ruby_2_2/array.c
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 58128)
+++ ruby_2_2/version.h	(revision 58129)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.7"
 #define RUBY_RELEASE_DATE "2017-03-26"
-#define RUBY_PATCHLEVEL 461
+#define RUBY_PATCHLEVEL 462
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_2/array.c
===================================================================
--- ruby_2_2/array.c	(revision 58128)
+++ ruby_2_2/array.c	(revision 58129)
@@ -5486,7 +5486,8 @@ rb_ary_any_p(VALUE ary) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/array.c#L5486
  *  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:
  *

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r58037


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]