summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-18 13:57:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-18 13:57:43 +0000
commitaaf1dc156eba0ae626534a3248a95e6a3656717f (patch)
tree6b35d0bc6435f40a0bc241840240657e46574825 /array.c
parent2722716e637ec0b9d45ae5bb556b228d7c2a7d29 (diff)
* array.c (rb_ary_shift): shorten copy size. fixed: [ruby-list:42907]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 2e9d927f6a..acc59d20b4 100644
--- a/array.c
+++ b/array.c
@@ -502,7 +502,7 @@ rb_ary_shift(ary)
if (RARRAY(ary)->len == 0) return Qnil;
top = RARRAY(ary)->ptr[0];
if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE && !FL_TEST(ary, ELTS_SHARED)) {
- MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary));
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary)-1);
}
else {
if (!FL_TEST(ary, ELTS_SHARED)) {