diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-18 13:57:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-18 13:57:43 +0000 |
commit | aaf1dc156eba0ae626534a3248a95e6a3656717f (patch) | |
tree | 6b35d0bc6435f40a0bc241840240657e46574825 /array.c | |
parent | 2722716e637ec0b9d45ae5bb556b228d7c2a7d29 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) { |