summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_hot.c4
-rwxr-xr-xt/op/pat.t21
2 files changed, 3 insertions, 22 deletions
diff --git a/pp_hot.c b/pp_hot.c
index c0c6fe888b..0f4a69326e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1222,7 +1222,7 @@ PP(pp_match)
TARG = DEFSV;
EXTEND(SP,1);
}
- PL_reg_sv = SvREFCNT_inc(TARG);
+ PL_reg_sv = TARG;
PUTBACK; /* EVAL blocks need stack_sp. */
s = SvPV(TARG, len);
strend = s + len;
@@ -1909,7 +1909,7 @@ PP(pp_subst)
TARG = DEFSV;
EXTEND(SP,1);
}
- PL_reg_sv = SvREFCNT_inc(TARG);
+ PL_reg_sv = TARG;
do_utf8 = DO_UTF8(PL_reg_sv);
if (SvFAKE(TARG) && SvREADONLY(TARG))
sv_force_normal(TARG);
diff --git a/t/op/pat.t b/t/op/pat.t
index 478e2994f0..d2d3205576 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..686\n";
+print "1..684\n";
BEGIN {
chdir 't' if -d 't';
@@ -1987,22 +1987,3 @@ print "ok 683\n" if @a == 9 && "@a" eq "f o o \n $a $b b a r";
$c = pos;
print "$a $b $c" eq 'ba:ba ad:ae 10' ? "ok 684\n" : "not ok 684\t# $a $b $c\n";
}
-
-{
- package ID_20010407_006;
-
- sub x {
- "a\x{1234}";
- }
-
- my $x = x;
- my $y;
-
- $x =~ /(..)/; $y = $1;
- print "not " unless length($y) == 2 && $y eq $x;
- print "ok 685\n" if length($y) == 2;
-
- x =~ /(..)/; $y = $1;
- print "not " unless length($y) == 2 && $y eq $x;
- print "ok 686\n";
-}