summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 00:43:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 00:43:59 +0000
commit7a62a9f53cec1f9ba1b9c79b4373fd11b44d7732 (patch)
tree4c4037044c7d2cd6256a6a3d828ab34e41706831
parent5a41ffced289753ea0832eee1af0a616db4f5edf (diff)
* array.c (rb_ary_initialize): should call rb_ary_modify() first.
[ruby-core:11562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--array.c2
-rw-r--r--version.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e3da1f9..2812c58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 22 09:41:56 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * array.c (rb_ary_initialize): should call rb_ary_modify() first.
+ [ruby-core:11562]
+
Wed Aug 22 09:40:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (yylex): return non-valid token for an invalid
diff --git a/array.c b/array.c
index acc59d2..d392fc1 100644
--- a/array.c
+++ b/array.c
@@ -272,6 +272,7 @@ rb_ary_initialize(argc, argv, ary)
long len;
VALUE size, val;
+ rb_ary_modify(ary);
if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
RARRAY(ary)->len = 0;
if (rb_block_given_p()) {
@@ -295,7 +296,6 @@ rb_ary_initialize(argc, argv, ary)
if (len > 0 && len * (long)sizeof(VALUE) <= len) {
rb_raise(rb_eArgError, "array size too big");
}
- rb_ary_modify(ary);
if (len > RARRAY(ary)->aux.capa) {
REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
RARRAY(ary)->aux.capa = len;
diff --git a/version.h b/version.h
index 05510e8..88967fe 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-22"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 52
+#define RUBY_PATCHLEVEL 53
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8