diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-07 07:06:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-07 07:06:32 +0000 |
commit | d167cfd196c410cbab11e1c3b8cce14297e4a085 (patch) | |
tree | 11eae1ed1c5591818ad3a3a8569ba6e75587b701 /struct.c | |
parent | be9766c37e614ca0a9286613f7b0a676f0c0adaf (diff) |
* include/ruby/ruby.h (rb_long2int): evalates the argument only
once.
* struct.c (rb_struct_alloc): check array length overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -415,7 +415,7 @@ struct_alloc(VALUE klass) VALUE rb_struct_alloc(VALUE klass, VALUE values) { - return rb_class_new_instance(RARRAY_LEN(values), RARRAY_PTR(values), klass); + return rb_class_new_instance(RARRAY_LENINT(values), RARRAY_PTR(values), klass); } VALUE |