fix AvREALISH bogusness
authorGurusamy Sarathy <gsar@cpan.org>
Fri, 6 Nov 1998 20:36:50 +0000 (20:36 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Fri, 6 Nov 1998 20:36:50 +0000 (20:36 +0000)
p4raw-id: //depot/perl@2210

av.c
t/op/array.t

diff --git a/av.c b/av.c
index 3f288f3..97f0ff8 100644 (file)
--- 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) {
index 8dea44d..3409556 100755 (executable)
@@ -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');