From: Jarkko Hietaniemi Date: Wed, 20 Jun 2001 00:48:20 +0000 (+0000) Subject: Integrate change #10739 from maintperl: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6002328acc4eebf94540b6802dbffeac7367da7a;p=p5sagit%2Fp5-mst-13.2.git Integrate change #10739 from maintperl: C fails to compile correctly p4raw-link: @10739 on //depot/maint-5.6/perl: a3d864e88a38f4417518c9eac1d0058e2537efe7 p4raw-id: //depot/perl@10742 p4raw-integrated: from //depot/maint-5.6/perl@10741 'merge in' t/op/pat.t (@9675..) toke.c (@10158..) --- diff --git a/t/op/pat.t b/t/op/pat.t index c59e31f..942e6e6 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..630\n"; +print "1..632\n"; BEGIN { chdir 't' if -d 't'; @@ -1765,3 +1765,21 @@ EOT print "ok 630\n"; } +$_ = "foo"; + +eval <<"EOT"; die if $@; + /f + o\r + o + \$ + /x && print "ok 631\n"; +EOT + +eval <<"EOT"; die if $@; + /f + o + o + \$\r + /x && print "ok 632\n"; +EOT + diff --git a/toke.c b/toke.c index fca0f73..34e2fd4 100644 --- a/toke.c +++ b/toke.c @@ -1374,7 +1374,7 @@ S_scan_const(pTHX_ char *start) else if (*s == '$') { if (!PL_lex_inpat) /* not a regexp, so $ must be var */ break; - if (s + 1 < send && !strchr("()| \n\t", s[1])) + if (s + 1 < send && !strchr("()| \r\n\t", s[1])) break; /* in regexp, $ might be tail anchor */ }