diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-12-27 21:41:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-12-27 21:41:03 +0000 |
commit | a2794585f298613c6353549c1058857370acfed3 (patch) | |
tree | 36a4098b67749050428a201adc00c26229f7bc30 /t | |
parent | 03949bffb4c2f692878d9c34d8b1be5484d73c6d (diff) | |
download | perl-a2794585f298613c6353549c1058857370acfed3.tar.gz |
scalars used in postponed subexpressions aren't first class regexps,
so don't upgrade them to ORANGE before attaching qr magic.
(And don't stop using qr magic once regexps become first class)
p4raw-id: //depot/perl@32748
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 61ac3f3333..138e5b113a 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4512,6 +4512,12 @@ sub kt } } +{ + my $a = 3; "" =~ /(??{ $a })/; + my $b = $a; + iseq($b, $a, "copy of scalar used for postponed subexpression"); +} + # Test counter is at bottom of file. Put new tests above here. #------------------------------------------------------------------- # Keep the following tests last -- they may crash perl @@ -4570,6 +4576,6 @@ ok($@=~/\QSequence \k... not terminated in regex;\E/); iseq(0+$::test,$::TestCount,"Got the right number of tests!"); # Don't forget to update this! BEGIN { - $::TestCount = 4013; + $::TestCount = 4014; print "1..$::TestCount\n"; } |