Skip to content

Commit

Permalink
Fix crash in temp/let with parametarized hashes
Browse files Browse the repository at this point in the history
Fixes RT#127291: https://rt.perl.org/Ticket/Display.html?id=127291

When we stash the hash for later restoration, we copy it into
a non-parametarized hash that stringifies the keys, causing a crash
when it's later restored into parametarized container.

Fix by stashing the hash into Mu/Mu parameterized hash that
leaves values untouched.
  • Loading branch information
zoffixznet committed Jan 22, 2018
1 parent ba67597 commit 0a32e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Rakudo/Internals.pm
Expand Up @@ -194,7 +194,7 @@ my class Rakudo::Internals {
nqp::push(restore,my @ = cont),
nqp::if(
nqp::istype(cont,Hash),
nqp::push(restore,my % = cont),
nqp::push(restore,Hash.^parameterize(Mu,Mu).new: cont),
nqp::stmts(
nqp::pop(restore), # lose the erroneously pushed value
X::Localizer::NoContainer.new(:$localizer).throw
Expand Down

0 comments on commit 0a32e51

Please sign in to comment.