Skip to content

Commit

Permalink
Fix issue with double quoted strings interpolating only a single vari…
Browse files Browse the repository at this point in the history
…able.

Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
arnsholt authored and moritz committed Mar 7, 2010
1 parent cca3cfc commit fe12ac8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Perl6/Actions.pm
Expand Up @@ -1982,7 +1982,14 @@ method quote:sym<m>($/) {
make create_code_object($past, 'Regex', 0, '');
}

method quote_escape:sym<$>($/) { make $<variable>.ast; }
method quote_escape:sym<$>($/) {
#make $<variable>.ast;
# my $a = 3; say "$a".WHAT # Gives Int, not Str with the above. Force
# stringification to fix this. This should probably be handled in nqp-rx,
# but work around it for now.
make PAST::Op.new( $<variable>.ast, :pirop('set SP') );
}

method quote_escape:sym<{ }>($/) {
make PAST::Op.new(
:pirop('set S*'), block_immediate($<block>.ast), :node($/)
Expand Down

0 comments on commit fe12ac8

Please sign in to comment.