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 objects can have negative .chars in Rakudo #1728

Closed
p6rt opened this issue Apr 27, 2010 · 3 comments
Closed

Match objects can have negative .chars in Rakudo #1728

p6rt opened this issue Apr 27, 2010 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 27, 2010

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

Searchable as RT74694$

@p6rt
Copy link
Author

p6rt commented Apr 27, 2010

From @masak

<masak> rakudo​: my $a = "a"; $a ~~ / $a /; say $/.chars
<p6eval> rakudo 0a04ef​: OUTPUT«-4␤»
<jnthn> Erm. :-)
<masak> I'm slightly uncomfortable with .chars ever returning
something negative.
<masak> tempted to submit that as a rakudobug.
<jnthn> It has unlength.
* moritz_ yawns. Another manifestation of $/ not being a proper Match object
<masak> "that's the shortest string I've ever seen!"
<moritz_> rakudo​: my $a = "a"; $a ~~ / $a /; say ?$/
<p6eval> rakudo 0a04ef​: OUTPUT«0␤»
<snarkyboojum> length with direction :)
<moritz_> so, a failed match
<masak> I know.
<moritz_> which has .from > .to
<masak> I know.
<masak> PGE and GGE do the same.
<masak> alpha​: "foo" ~~ /bar/; say $/.chars
<p6eval> alpha 30e0ed​: OUTPUT«0␤»
<masak> moritz_​: still don't manifest that bug.
<moritz_> masak​: just submit it; one more ticket I can close when I
get proper Match objects running in Perl 6
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @moritz

Fixed in nqp-rx and rakudo, and tested in S05-match/positions.t

@p6rt
Copy link
Author

p6rt commented May 30, 2010

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

@p6rt p6rt closed this as completed May 30, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant