diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 16:03:42 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 16:03:42 +0000 |
commit | f2edb94ee71a8ba34e31f7a30482e2255ecb4acf (patch) | |
tree | 3d1c50128755c27adc564942a47997dd02bc29ba /array.c | |
parent | 40270906824a981652719c5e614c2cf4d1c234b0 (diff) |
merge revision(s) 51532: [Backport #11433]
* array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N
already multiplies element size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5097,7 +5097,7 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num) } else { /* this is the general case */ volatile VALUE t0; - long *p = ALLOCV_N(long, t0, r * sizeof(long)); + long *p = ALLOCV_N(long, t0, r); VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */ RBASIC_CLEAR_CLASS(ary0); |