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

Match object inside .comb is weird (‘789’.comb(/ . {say $/} <!> /)) #5827

Closed
p6rt opened this issue Nov 27, 2016 · 4 comments
Closed

Match object inside .comb is weird (‘789’.comb(/ . {say $/} <!> /)) #5827

p6rt opened this issue Nov 27, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Nov 27, 2016

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

Searchable as RT130186$

@p6rt
Copy link
Author

p6rt commented Nov 27, 2016

From @AlexDaniel

*Code​:*
dd �789�.comb(/ . {say $/} <!> /)'

*Result​:*
ï½¢7ï½£
ï½¢7ï½£
ï½¢7ï½£
slip()

It may seem like it is stuck on �7� and does not progress at all. However,
if we add parens around . we will get this​:

*Code​:*
dd �789�.comb(/ (.) {say $/} <!> /)

*Result​:*
ï½¢7ï½£
0 => ï½¢7ï½£
ï½¢8ï½£
0 => ï½¢8ï½£
ï½¢9ï½£
0 => ï½¢9ï½£
slip()

I do not understand why the first snippet prints ï½¢7ï½£ three times.

@p6rt
Copy link
Author

p6rt commented Oct 3, 2017

From @AlexDaniel

This was fixed during the uncurse merge. Bisect log (20 candidates)​: https://gist.github.com/7cedc2e2e35913544f75bc5fc89bd088

ï½¢testneededï½£

On 2016-11-26 18​:36​:35, alex.jakimenko@​gmail.com wrote​:

*Code​:*
dd ‘789’.comb(/ . {say $/} <!> /)'

*Result​:*
ï½¢7ï½£
ï½¢7ï½£
ï½¢7ï½£
slip()

It may seem like it is stuck on ‘7’ and does not progress at all. However,
if we add parens around . we will get this​:

*Code​:*
dd ‘789’.comb(/ (.) {say $/} <!> /)

*Result​:*
ï½¢7ï½£
0 => ï½¢7ï½£
ï½¢8ï½£
0 => ï½¢8ï½£
ï½¢9ï½£
0 => ï½¢9ï½£
slip()

I do not understand why the first snippet prints ï½¢7ï½£ three times.

@p6rt
Copy link
Author

p6rt commented Oct 7, 2017

From @moritz

Test added​: Raku/roast@005b4f76f7

@p6rt
Copy link
Author

p6rt commented Oct 7, 2017

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 7, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant