From 352edd9075ba60982b61693a9f3cdf22a5d9b2f9 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 6 Nov 1998 20:36:50 +0000 Subject: [PATCH] fix AvREALISH bogusness p4raw-id: //depot/perl@2210 --- av.c | 5 +---- t/op/array.t | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/av.c b/av.c index 3f288f3..97f0ff8 100644 --- a/av.c +++ b/av.c @@ -175,10 +175,7 @@ av_fetch(register AV *av, I32 key, I32 lval) if (key > AvFILLp(av)) { if (!lval) return 0; - if (AvREALISH(av)) - sv = NEWSV(5,0); - else - sv = sv_newmortal(); + sv = NEWSV(5,0); return av_store(av,key,sv); } if (AvARRAY(av)[key] == &PL_sv_undef) { diff --git a/t/op/array.t b/t/op/array.t index 8dea44d..3409556 100755 --- a/t/op/array.t +++ b/t/op/array.t @@ -1,6 +1,6 @@ #!./perl -print "1..63\n"; +print "1..65\n"; # # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them @@ -206,3 +206,8 @@ t("@bar" eq "foo bar"); # 43 t("@bee" eq "foo bar burbl blah"); # 63 } +# make sure reification behaves +my $t = 63; +sub reify { $_[1] = ++$t; print "@_\n"; } +reify('ok'); +reify('ok'); -- 2.7.4