Skip to content

Commit

Permalink
Fix Hash.perl creating code that throws an error when EVALing
Browse files Browse the repository at this point in the history
.perl on an empty, itemized hash generated ${} which throws an error about
${} no longer being the correct syntax and using $() instead.
{}.item means the same and is EVALable
  • Loading branch information
niner committed Aug 21, 2015
1 parent 46290dc commit 979d2d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Hash.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ my class Hash { # declared in BOOTSTRAP
}

multi method perl(Hash:D \SELF:) {
'$' x nqp::iscont(SELF) ~
'{' ~ SELF.pairs.sort.map({.perl}).join(', ') ~ '}'
~ '.item' x nqp::iscont(SELF)
}

multi method gist(Hash:D:) {
Expand Down

0 comments on commit 979d2d4

Please sign in to comment.