diff options
-rwxr-xr-x | t/base/lex.t | 4 | ||||
-rw-r--r-- | toke.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/t/base/lex.t b/t/base/lex.t index 7e0ca70fd7..6d03b9e8df 100755 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -2,7 +2,7 @@ # $RCSfile: lex.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:04 $ -print "1..26\n"; +print "1..27\n"; $x = 'x'; @@ -103,3 +103,5 @@ print "${foo{$bar}}" eq "BAZ" ? "ok 23\n" : "not ok 23\n"; print "FOO:" =~ /$foo[:]/ ? "ok 24\n" : "not ok 24\n"; print "ABC" =~ /^$ary[$A]$/ ? "ok 25\n" : "not ok 25\n"; print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 26\n" : "not ok 26\n"; + +print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 27\n" : "not ok 27\n"); @@ -4953,8 +4953,8 @@ char *start; for (; s < bufend; s++,to++) { if (*s == '\n' && !rsfp) curcop->cop_line++; - if (*s == '\\' && s+1 < bufend && term != '\\') { - if (s[1] == term) + if (*s == '\\' && s+1 < bufend) { + if ((s[1] == multi_open) || (s[1] == term)) s++; else *to++ = *s++; |