Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUOTE does not remove backslash with adverb :b #5031

Closed
p6rt opened this issue Jan 9, 2016 · 5 comments
Closed

QUOTE does not remove backslash with adverb :b #5031

p6rt opened this issue Jan 9, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 9, 2016

Migrated from rt.perl.org#127226 (status was 'resolved')

Searchable as RT127226$

@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

From @gfldex

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

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

@p6rt
Copy link
Author

p6rt commented Jun 23, 2017

From @zoffixznet

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␤»

@p6rt
Copy link
Author

p6rt commented Jun 23, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 30, 2018

From @zoffixznet

On Fri, 23 Jun 2017 05​:28​:22 -0700, cpan@​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​: rakudo/rakudo@deffe54b8d6986b
Test​: Raku/roast@284a97d31dca86843

@p6rt
Copy link
Author

p6rt commented Jan 30, 2018

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant