Skip to content

Commit

Permalink
Update EnumMap.ACCEPTS(Regex), removing another nom regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jun 22, 2012
1 parent 5f0f3f0 commit 1b6636f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/EnumMap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ my class EnumMap does Associative {
multi method ACCEPTS(EnumMap:D: Positional $topic) {
so self.exists($topic.any);
}

multi method ACCEPTS(EnumMap:D: Regex $topic) {
so self.keys.any.match($topic);
}

proto method exists(|$) {*}
multi method exists(EnumMap:D: Str:D \$key) {
Expand Down

0 comments on commit 1b6636f

Please sign in to comment.