diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-02-17 08:22:44 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-02-20 09:30:38 +0100 |
commit | fceebc475db7280476c58dcfb36c7e1cd6795eec (patch) | |
tree | 667edbec4d72dab8e4fec5dfd7bb230d3af5809a | |
parent | 9e079acef3281a4f29fb1913eeef734bf70ba393 (diff) | |
download | perl-fceebc475db7280476c58dcfb36c7e1cd6795eec.tar.gz |
Fix {%hash} ~~ %hash test
This was not parsed as a smart match, because {%hash} was taken
as a block, not a an anonymous hash.
Also, avoid to construct an anonymous hash with an odd number of
elements.
-rw-r--r-- | t/op/smartmatch.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index cf06a4468f..e2ea00483c 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -201,7 +201,7 @@ __DATA__ # - a regex {foo => 1} qr/^(fo[ox])$/ -! +{0..100} qr/[13579]$/ +! +{0..99} qr/[13579]$/ # - a string +{foo => 1, bar => 2} "foo" @@ -267,7 +267,7 @@ __DATA__ %hash [qw(bar)] ! %hash [qw(a b c)] %hash %hash - %hash {%hash} + %hash +{%hash} %hash %tied_hash %tied_hash %tied_hash %hash { foo => 5, bar => 10 } |