[perl #127226] QUOTE does not remove backslash with adverb :b

2018-01-30 Thread Zoffix Znet via RT
On Fri, 23 Jun 2017 05:28:22 -0700, c...@zoffix.com wrote:
> On Sat, 09 Jan 2016 10:23:18 -0800, gfldex wrote:
> > my $x = 42; say Q:s:b{\$x}
> >
> > # OUTPUT«\42␤»
> > # EXPECTED«42␤»
> 
> Worth nothing the OP's expected is not correct. The result should be
> string '$x', as the backslash would escape the sigil and prevent it
> from being interpolated. It actually works right-er when using `q`
> instead of `Q` quoter, but the backslash remains unremoved:
> 
> m: my $x = 42; say q:s:b{\$x}
> rakudo-moar 4a37de: OUTPUT: «\$x␤»
> m: my $x = 42; say Q:s:b{\$x}
> rakudo-moar 4a37de: OUTPUT: «\42␤»


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/deffe54b8d6986b
Test: https://github.com/perl6/roast/commit/284a97d31dca86843



[perl #127226] QUOTE does not remove backslash with adverb :b

2018-01-30 Thread Zoffix Znet via RT
On Fri, 23 Jun 2017 05:28:22 -0700, c...@zoffix.com wrote:
> On Sat, 09 Jan 2016 10:23:18 -0800, gfldex wrote:
> > my $x = 42; say Q:s:b{\$x}
> >
> > # OUTPUT«\42␤»
> > # EXPECTED«42␤»
> 
> Worth nothing the OP's expected is not correct. The result should be
> string '$x', as the backslash would escape the sigil and prevent it
> from being interpolated. It actually works right-er when using `q`
> instead of `Q` quoter, but the backslash remains unremoved:
> 
> m: my $x = 42; say q:s:b{\$x}
> rakudo-moar 4a37de: OUTPUT: «\$x␤»
> m: my $x = 42; say Q:s:b{\$x}
> rakudo-moar 4a37de: OUTPUT: «\42␤»


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/deffe54b8d6986b
Test: https://github.com/perl6/roast/commit/284a97d31dca86843


[perl #127226] QUOTE does not remove backslash with adverb :b

2017-06-23 Thread Zoffix Znet via RT
On Sat, 09 Jan 2016 10:23:18 -0800, gfldex wrote:
> my $x = 42; say Q:s:b{\$x}
> 
> # OUTPUT«\42␤»
> # EXPECTED«42␤»

Worth nothing the OP's expected is not correct. The result should be string 
'$x', as the backslash would escape the sigil and prevent it from being 
interpolated. It actually works right-er when using `q` instead of `Q` quoter, 
but the backslash remains unremoved:

m: my $x = 42; say q:s:b{\$x}
rakudo-moar 4a37de: OUTPUT: «\$x␤»
m: my $x = 42; say Q:s:b{\$x}
rakudo-moar 4a37de: OUTPUT: «\42␤»


[perl #127226] QUOTE does not remove backslash with adverb :b

2017-06-23 Thread Zoffix Znet via RT
On Sat, 09 Jan 2016 10:23:18 -0800, gfldex wrote:
> my $x = 42; say Q:s:b{\$x}
> 
> # OUTPUT«\42␤»
> # EXPECTED«42␤»

Worth nothing the OP's expected is not correct. The result should be string 
'$x', as the backslash would escape the sigil and prevent it from being 
interpolated. It actually works right-er when using `q` instead of `Q` quoter, 
but the backslash remains unremoved:

m: my $x = 42; say q:s:b{\$x}
rakudo-moar 4a37de: OUTPUT: «\$x␤»
m: my $x = 42; say Q:s:b{\$x}
rakudo-moar 4a37de: OUTPUT: «\42␤»



[perl #127226] QUOTE does not remove backslash with adverb :b

2016-01-09 Thread via RT
# New Ticket Created by  Wenzel Peppmeyer 
# Please include the string:  [perl #127226]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=127226 >


my $x = 42; say Q:s:b{\$x}

# OUTPUT«\42␤»
# EXPECTED«42␤»