From: Gurusamy Sarathy Date: Fri, 6 Nov 1998 20:36:50 +0000 (+0000) Subject: fix AvREALISH bogusness X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=352edd9075ba60982b61693a9f3cdf22a5d9b2f9;p=p5sagit%2Fp5-mst-13.2.git fix AvREALISH bogusness p4raw-id: //depot/perl@2210 --- 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');