summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 19:39:42 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 19:39:42 +0000
commit243c8f8b1d8c5070fb8f01b8b7f1b4c9ce9a1a14 (patch)
treec31ca9166dfc8c4b96591af71a7dd417a05fe384
parent38cfb362f07cee77ba4ac9c61c42dbcdada77961 (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_5@12970 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 c1973f73cbc..7344ddb8e32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 16 04:39:15 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * array.c (rb_ary_initialize): should call rb_ary_modify() first.
+ [ruby-core:11562]
+
Thu Aug 16 04:38:39 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 d456373fe4a..a67e9233d18 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 3a06c0cd814..a7e5971010b 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-16"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070816
-#define RUBY_PATCHLEVEL 63
+#define RUBY_PATCHLEVEL 64
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8