summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-27 15:43:35 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-27 15:43:35 +0000
commit8dbfd4b86c6ec0dce0472a735f30dfcd081ef87c (patch)
treeceff145e1a714dfc05890283347c2988fe4a8b53
parent64cf9f115322b760b9468f4c36233bd5aa275e2b (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--array.c3
-rw-r--r--version.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/array.c b/array.c
index da38d945b1..3bd267a51f 100644
--- a/array.c
+++ b/array.c
@@ -5592,7 +5592,8 @@ rb_ary_dig(int argc, VALUE *argv, VALUE self)
* 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:
*
diff --git a/version.h b/version.h
index 1754670c89..9f72a0ac4e 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.3"
#define RUBY_RELEASE_DATE "2017-03-28"
-#define RUBY_PATCHLEVEL 272
+#define RUBY_PATCHLEVEL 273
#define RUBY_RELEASE_YEAR 2017
#define RUBY_RELEASE_MONTH 3