From: Malcolm Beattie Date: Thu, 27 Nov 1997 14:48:58 +0000 (+0000) Subject: Fix PVLV case in sv_setsv (plus tests in op/pat.t). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=74d6a13a31d64f4c7191d7ad43d47abf825df663;p=p5sagit%2Fp5-mst-13.2.git Fix PVLV case in sv_setsv (plus tests in op/pat.t). p4raw-id: //depot/perl@315 --- diff --git a/sv.c b/sv.c index 9a7f075..77feae2 100644 --- a/sv.c +++ b/sv.c @@ -1889,10 +1889,6 @@ sv_setsv(SV *dstr, register SV *sstr) sv_upgrade(dstr, SVt_PVNV); break; - case SVt_PVLV: - sv_upgrade(dstr, SVt_PVLV); - break; - case SVt_PVAV: case SVt_PVHV: case SVt_PVCV: diff --git a/t/op/pat.t b/t/op/pat.t index 03af122..a9e6869 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -2,7 +2,7 @@ # $RCSfile: pat.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:12 $ -print "1..97\n"; +print "1..100\n"; $x = "abc\ndef\n"; @@ -328,3 +328,23 @@ print "not " if $blah != 45; print "ok $test\n"; $test++; +$x = 'banana'; +$x =~ /.a/g; +print "not " unless pos($x) == 2; +print "ok $test\n"; +$test++; + +$x =~ /.z/gc; +print "not " unless pos($x) == 2; +print "ok $test\n"; +$test++; + +sub f { + my $p = $_[0]; + return $p; +} + +$x =~ /.a/g; +print "not " unless f(pos($x)) == 4; +print "ok $test\n"; +$test++;