Skip to content

Commit

Permalink
Make hash(foo=>2) work
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jun 29, 2011
1 parent 4f237ff commit dadaada
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/CORE.setting
Expand Up @@ -709,7 +709,10 @@ my class IterCursor {
}
sub flat(*@x) { @x }
sub hash(\|@x) { %(@x.unwrap-single) }
sub hash(|$cap) {
(%$cap || $cap.Parcel.raw_elems != 1) ??
%( @$cap, %$cap ) !! %( $$cap )
}
my class Whatever {
method ACCEPTS(Mu $x) { defined(self) || $x.^isa(Whatever) }
Expand Down
3 changes: 3 additions & 0 deletions t/spectest.data
Expand Up @@ -59,7 +59,10 @@ S04-statement-modifiers/for.t
S04-statement-modifiers/given.t
S04-statement-modifiers/if.t
S04-statement-modifiers/unless.t
S04-statement-modifiers/until.t
S04-statement-modifiers/values_in_bool_context.t
S04-statement-modifiers/while.t
S04-statement-parsing/hash.t
S04-statements/do.t
S04-statements/gather.t
S04-statements/for-scope.t
Expand Down

0 comments on commit dadaada

Please sign in to comment.