diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-28 01:44:31 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-28 02:04:58 -0700 |
commit | 0960ff5ae77d081b538d8f0690367bb5144cf1c1 (patch) | |
tree | 71a74f76100f68dfb29ebe268827bbb76c06f3ad /av.c | |
parent | c06ecf4f38015d4985dd5994aebe5c15908d2f26 (diff) | |
download | perl-0960ff5ae77d081b538d8f0690367bb5144cf1c1.tar.gz |
Don’t skip tied EXISTS for negative array indices
This was broken in 5.14.0 for those cases where $NEGATIVE_INDICES is
not true:
sub TIEARRAY{bless[]};
sub FETCHSIZE { 50 }
sub EXISTS { print "does $_[1] exist?\n" }
tie @a, "";
exists $a[1];
exists $a[-1];
$NEGATIVE_INDICES=1;
exists $a[-1];
$ pbpaste|perl5.12.0
does 1 exist?
does 49 exist?
does -1 exist?
$ pbpaste|perl5.14.0
does 1 exist?
does -1 exist?
This was broken by 54a4274e3c.
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -968,8 +968,6 @@ Perl_av_exists(pTHX_ AV *av, I32 key) key += AvFILL(av) + 1; if (key < 0) return FALSE; - else - return TRUE; } } |