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

Str.trans pushes wrong match to its closures (on second invocation) #358

Closed
p6rt opened this issue Oct 8, 2008 · 3 comments
Closed

Str.trans pushes wrong match to its closures (on second invocation) #358

p6rt opened this issue Oct 8, 2008 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Oct 8, 2008

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

Searchable as RT59730$

@p6rt
Copy link
Author

p6rt commented Oct 8, 2008

From @moritz

r31792​:

$ ../../parrot perl6.pbc -e 'say "hello".trans(/(l)/ => { $_[0].ord })'
he10848o

that should have been 'he108108o'. Printing $_[0] in the closure reveals
that it's wrong on the second call​:

$ ../../parrot perl6.pbc -e 'say "hello".trans(/(l)/ => { say $_[0];
$_[0].ord })'
l
0
he10848o

Not sure if that's yet another manifestation of RT #​57094 or something
different. Will add TODO test to t/spec/S05-transliteration/with-closure.t.

Moritz

--
Moritz Lenz
http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

@p6rt
Copy link
Author

p6rt commented Oct 9, 2008

From @moritz

On Wed Oct 08 12​:56​:14 2008, moritz@​casella.verplant.org wrote​:

r31792​:

$ ../../parrot perl6.pbc -e 'say "hello".trans(/(l)/ => { $_[0].ord })'
he10848o

that should have been 'he108108o'.

Worked around in r31835 (by Chris Fields).
Moritz

@p6rt
Copy link
Author

p6rt commented Oct 9, 2008

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

@p6rt p6rt closed this as completed Oct 9, 2008
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