Skip to content

Commit

Permalink
Simplify Enum.BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Apr 18, 2015
1 parent 1ce8732 commit 909dc43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Enum.pm
Expand Up @@ -3,7 +3,7 @@ my class Enum does Associative {
has $.value;

method new(:$key, Mu :$value) { nqp::create(self).BUILD($key, $value) }
method BUILD(\key, Mu \value) { $!key = key; $!value = value; self }
method BUILD($!key, Mu $!value) { self }

multi method ACCEPTS(Enum:D: Associative:D $topic) {
$topic{$.key} ~~ $.value
Expand Down

0 comments on commit 909dc43

Please sign in to comment.