From: Gurusamy Sarathy Date: Sun, 17 Jan 1999 13:39:59 +0000 (+0000) Subject: bogus assert() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13d7cbc19a96f5e624f1b194ed83075a47c1251d;p=p5sagit%2Fp5-mst-13.2.git bogus assert() p4raw-id: //depot/perl@2633 --- diff --git a/pp.c b/pp.c index 44114e7..84ee4f4 100644 --- a/pp.c +++ b/pp.c @@ -2853,12 +2853,8 @@ PP(pp_splice) newlen = SP - MARK; diff = newlen - length; - if (newlen && !AvREAL(ary)) { - if (AvREIFY(ary)) - av_reify(ary); - else - assert(AvREAL(ary)); /* would leak, so croak */ - } + if (newlen && !AvREAL(ary) && AvREIFY(ary)) + av_reify(ary); if (diff < 0) { /* shrinking the area */ if (newlen) { diff --git a/t/op/groups.t b/t/op/groups.t index 824e88d..dc8385b 100755 --- a/t/op/groups.t +++ b/t/op/groups.t @@ -4,6 +4,13 @@ $ENV{PATH} ="/bin:/usr/bin:/usr/xpg4/bin:/usr/ucb" . exists $ENV{PATH} ? ":$ENV{PATH}" : ""; $ENV{LC_ALL} = "C"; # so that external utilities speak English +sub quit { + print "1..0\n"; + exit 0; +} + +quit() if $^O eq 'MSWin32'; + # We have to find a command that prints all (effective # and real) group names (not ids). The known commands are: # groups @@ -54,8 +61,7 @@ EOM last GROUPS; } # Okay, not today. - print "1..0\n"; - exit 0; + quit(); } # Remember that group names can contain whitespace, '-', et cetera.