diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 07:08:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 07:08:42 +0000 |
commit | b11975dfe072630a0a14ab4664a688b855cbdaa6 (patch) | |
tree | 5d2d7e1bb068c749dc48043b4d5202a197a5ccb9 /sample | |
parent | 06de286c68f04b989cd7fd6e282065b3e8479d7e (diff) | |
download | ruby-b11975dfe072630a0a14ab4664a688b855cbdaa6.tar.gz |
array.c: make array really suitable for queue
* array.c (ary_ensure_room_for_push): make array really suitable for
queue. [Feature #6638]
when array is shared (which happens after Array#shift), and
ARY_SHARED_NUM == 1 (which is very often when array used as queue),
then make rb_ary_push push directly into shared array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
0 files changed, 0 insertions, 0 deletions