Skip to content

Commit

Permalink
Fix Whatever in .[*] and .{*} . Fixes RT #77072.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Aug 7, 2010
1 parent e569d66 commit fca2d32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/Any-list.pm
Expand Up @@ -288,6 +288,10 @@ augment class Any {

our multi method postcircumfix:<[ ]>() { self.list }

our multi method postcircumfix:<[ ]>(Whatever $w) {
self[0..(self.elems-1)]
}

our multi method postcircumfix:<[ ]>(&block) { self[&block(self.elems)]; }

our multi method postcircumfix:<[ ]>(@pos) {
Expand Down Expand Up @@ -322,6 +326,10 @@ augment class Any {
self.values()
}
our multi method postcircumfix:<{ }>(Whatever $w) {
self.{self.keys}
}
our multi method postcircumfix:<{ }>(@keys) {
my $result = pir::new__ps('ResizablePMCArray');
for @keys {
Expand Down

0 comments on commit fca2d32

Please sign in to comment.