diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-24 11:22:21 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-24 11:22:21 +0000 |
commit | 3480a8d2d46562b783befbcecf951d5a2b4067d7 (patch) | |
tree | 5f87c595612ae7d8e6c1a0582e12448cb275542f | |
parent | b3980c394843d18896023d060cf87f3a509acec8 (diff) | |
download | perl-3480a8d2d46562b783befbcecf951d5a2b4067d7.tar.gz |
The tokenizer should expect an operator after qw().
This fixes [perl #35885] qw and x operators doesn't mix
p4raw-id: //depot/perl@24560
-rwxr-xr-x | t/op/repeat.t | 5 | ||||
-rw-r--r-- | toke.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/t/op/repeat.t b/t/op/repeat.t index e728413e9b..d1083e8a8f 100755 --- a/t/op/repeat.t +++ b/t/op/repeat.t @@ -6,7 +6,7 @@ BEGIN { } require './test.pl'; -plan(tests => 41); +plan(tests => 42); # compile time @@ -151,3 +151,6 @@ is(77, scalar ((1,7)x2), 'stack truncation'); } is($y, 'abcdabcd'); } + +# [perl #35885] +is( (join ',', (qw(a b c) x 3)), 'a,b,c,a,b,c,a,b,c', 'x on qw produces list' ); @@ -4956,6 +4956,7 @@ Perl_yylex(pTHX) s = scan_str(s,FALSE,FALSE); if (!s) missingterm((char*)0); + PL_expect = XOPERATOR; force_next(')'); if (SvCUR(PL_lex_stuff)) { OP *words = Nullop; |