mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* marshal.c (w_object): add a check for modification of array during
its dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
924836c080
commit
41a1a4ed76
3 changed files with 14 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jun 3 00:26:48 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* marshal.c (w_object): add a check for modification of array during
|
||||
its dump.
|
||||
|
||||
Mon Jun 2 22:27:57 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* enc/iso_8859_5.c: Large omicron should lowercase to small omicron.
|
||||
|
|
11
marshal.c
11
marshal.c
|
@ -703,13 +703,14 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
|
|||
w_uclass(obj, rb_cArray, arg);
|
||||
w_byte(TYPE_ARRAY, arg);
|
||||
{
|
||||
long len = RARRAY_LEN(obj);
|
||||
VALUE *ptr = RARRAY_PTR(obj);
|
||||
long i, len = RARRAY_LEN(obj);
|
||||
|
||||
w_long(len, arg);
|
||||
while (len--) {
|
||||
w_object(*ptr, arg, limit);
|
||||
ptr++;
|
||||
for (i=0; i<RARRAY_LEN(obj); i++) {
|
||||
w_object(RARRAY_PTR(obj)[i], arg, limit);
|
||||
if (len != RARRAY_LEN(obj)) {
|
||||
rb_raise(rb_eRuntimeError, "array modified during dump");
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-06-02"
|
||||
#define RUBY_RELEASE_DATE "2008-06-03"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080602
|
||||
#define RUBY_RELEASE_CODE 20080603
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2008
|
||||
#define RUBY_RELEASE_MONTH 6
|
||||
#define RUBY_RELEASE_DAY 2
|
||||
#define RUBY_RELEASE_DAY 3
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Reference in a new issue