summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-10-28 01:44:31 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-10-28 02:04:58 -0700
commit0960ff5ae77d081b538d8f0690367bb5144cf1c1 (patch)
tree71a74f76100f68dfb29ebe268827bbb76c06f3ad /av.c
parentc06ecf4f38015d4985dd5994aebe5c15908d2f26 (diff)
downloadperl-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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/av.c b/av.c
index b7070593b7..4bdd72df16 100644
--- a/av.c
+++ b/av.c
@@ -968,8 +968,6 @@ Perl_av_exists(pTHX_ AV *av, I32 key)
key += AvFILL(av) + 1;
if (key < 0)
return FALSE;
- else
- return TRUE;
}
}