Permalink
Browse files

Fix bug where hash keys are not properly escaped in uneval.

Fix bug where hash keys don't get properly escaped in uneval resulting in code
that fails when an eval or reval attempt is made.
  • Loading branch information...
1 parent 069f95c commit 67cc2df5449f61b0b7ae20910ece09c8101e8e87 @pajamian pajamian committed Apr 26, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Vend/Util.pm
View
@@ -655,6 +655,7 @@ sub uneval_it {
} elsif ($r eq 'HASH') {
$s = "{";
while (($key, $value) = each %$o) {
+ $key =~ s/(['\\])/\\$1/g;
$s .= "'$key' => " . uneval_it($value) . ",";
}
$s .= "}";

0 comments on commit 67cc2df

Please sign in to comment.