summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-07 07:06:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-07 07:06:32 +0000
commitd167cfd196c410cbab11e1c3b8cce14297e4a085 (patch)
tree11eae1ed1c5591818ad3a3a8569ba6e75587b701 /struct.c
parentbe9766c37e614ca0a9286613f7b0a676f0c0adaf (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index f3b8279213..fe3885f7a6 100644
--- a/struct.c
+++ b/struct.c
@@ -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