зеркало из https://github.com/github/ruby.git
* array.c (ary_resize_capa): should not overwrite outside embedded
array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a8167d58b9
Коммит
e1646e639a
|
@ -1,3 +1,8 @@
|
|||
Sun Feb 15 00:39:44 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* array.c (ary_resize_capa): should not overwrite outside embedded
|
||||
array.
|
||||
|
||||
Sat Feb 14 20:18:19 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/test_time.rb: extracted from lib/time.rb.
|
||||
|
|
3
array.c
3
array.c
|
@ -163,7 +163,8 @@ ary_resize_capa(VALUE ary, long capacity)
|
|||
else {
|
||||
if (!ARY_EMBED_P(ary)) {
|
||||
long len = RARRAY_LEN(ary);
|
||||
VALUE *ptr = RARRAY_PTR(ary);
|
||||
VALUE *ptr = RARRAY_PTR(ary);
|
||||
if (len > capacity) len = capacity;
|
||||
MEMCPY(RARRAY(ary)->as.ary, ptr, VALUE, len);
|
||||
FL_SET_EMBED(ary);
|
||||
ARY_SET_LEN(ary, len);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.2"
|
||||
#define RUBY_RELEASE_DATE "2009-02-14"
|
||||
#define RUBY_RELEASE_DATE "2009-02-15"
|
||||
#define RUBY_PATCHLEVEL -1
|
||||
#define RUBY_BRANCH_NAME "trunk"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
#define RUBY_VERSION_TEENY 1
|
||||
#define RUBY_RELEASE_YEAR 2009
|
||||
#define RUBY_RELEASE_MONTH 2
|
||||
#define RUBY_RELEASE_DAY 14
|
||||
#define RUBY_RELEASE_DAY 15
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче