Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assignable .key and .value for Pair.
  • Loading branch information
jnthn committed Aug 3, 2011
1 parent 8443d11 commit 40f4264
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Pair.pm
@@ -1,5 +1,6 @@
my class Pair is Enum does Associative {
# method value() is rw { ... }
method key() is rw { nqp::getattr(self, Enum, '$!key') }
method value() is rw { nqp::getattr(self, Enum, '$!value') }

multi method ACCEPTS(Pair:D: %h) {
$.value.ACCEPTS(%h{%.key});
Expand Down

0 comments on commit 40f4264

Please sign in to comment.