Project

General

Profile

« Previous | Next » 

Revision b11975df

Added by nobu (Nobuyoshi Nakada) over 11 years ago

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