Project

General

Profile

« Previous | Next » 

Revision 97ecab7b

Added by shirosaki over 11 years ago

Fix cache validity check of require

  • array.c (rb_ary_shared_with_p): fix cache validity check.
    If #pop or #shift has been called against $: or $", the array will
    be still shared with the snapshot. We check array length for cache
    validity.
    [ruby-core:49518] [Bug #7383]

  • test/ruby/test_require.rb
    (TestRequire#test_require_with_array_pop,
    TestRequire#test_require_with_array_shift): add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e