Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Match objects can have negative .chars in Rakudo #1728

Closed p6rt closed 14 years ago

p6rt commented 14 years ago

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

Searchable as RT74694$

p6rt commented 14 years ago

From @masak

\ rakudo​: my $a = "a"; $a ~~ / $a /; say $/.chars \ rakudo 0a04ef​: OUTPUT«-4␤» \ Erm. :-) \ I'm slightly uncomfortable with .chars ever returning something negative. \ tempted to submit that as a rakudobug. \ It has unlength. * moritz_ yawns. Another manifestation of $/ not being a proper Match object \ "that's the shortest string I've ever seen!" \<moritz_> rakudo​: my $a = "a"; $a ~~ / $a /; say ?$/ \ rakudo 0a04ef​: OUTPUT«0␤» \ length with direction :) \<moritz_> so, a failed match \ I know. \<moritz_> which has .from > .to \ I know. \ PGE and GGE do the same. \ alpha​: "foo" ~~ /bar/; say $/.chars \ alpha 30e0ed​: OUTPUT«0␤» \ 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 commented 14 years ago

From @moritz

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

p6rt commented 14 years ago

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