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

NFG + :ignoremark = negative codepoint error #5341

Closed
p6rt opened this issue May 27, 2016 · 6 comments
Closed

NFG + :ignoremark = negative codepoint error #5341

p6rt opened this issue May 27, 2016 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 27, 2016

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

Searchable as RT128270$

@p6rt
Copy link
Author

p6rt commented May 27, 2016

From @geekosaur

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented May 27, 2016

From @geekosaur

Sigh, hit wrong thing while trying to paste...

[27 17​:32] <geekosaur> m​: my $x = "áéć"; $x ~~ s​:ignoremark/a/a/; $x.say
[27 17​:32] <camelia> rakudo-moar e5bd09​: OUTPUT«aéć␤
[27 17​:32] »
[27 17​:32] <geekosaur> not quite the same thing though
[27 17​:33] <geekosaur> o.O
[27 17​:33] <geekosaur> m​: my $x = "áéć"; $x ~~
s​:g​:ignoremark/(<[ace]>)/$0/; $x.say
[27 17​:33] <camelia> rakudo-moar e5bd09​: OUTPUT«===SORRY!===␤
[27 17​:33] chr codepoint cannot be negative␤
[27 17​:33] »
[27 17​:33] <psch> m​: my $x = "áéć"; $x ~~ s​:ignoremark/(.)/$0/; $x.say
[27 17​:33] <camelia> rakudo-moar e5bd09​: OUTPUT«áéć␤
[27 17​:33] »
[27 17​:33] <psch> geekosaur​: that looks like a RT ticket in the making to
me :)
[27 17​:33] <psch> *an
[27 17​:34] <geekosaur> yes, yes it does

On Fri, May 27, 2016 at 4​:01 PM, Brandon Allbery <
perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Brandon Allbery
# Please include the string​: [perl #​128270]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128270 >

--
brandon s allbery kf8nh sine nomine
associates
allbery.b@​gmail.com
ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad
http://sinenomine.net

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Jul 16, 2016

From @zoffixznet

Slightly golfed. The content of the regex character set doesn't matter, but avoiding the character set avoids the error as well. The :g and :ignoremark must be combined together.

<Zoffix> m​: "a" ~~ m​:g​:ignoremark/<[á]>/
<camelia> rakudo-moar e2ec35​: OUTPUT«===SORRY!===␤chr codepoint cannot be negative␤»
<Zoffix> m​: "a" ~~ m​:g​:ignoremark/. <[á]>/
<camelia> rakudo-moar e2ec35​: OUTPUT«chr codepoint cannot be negative␤ in block <unit> at <tmp> line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Jul 16, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 21, 2016

From @jnthn

On Fri Jul 15 20​:09​:30 2016, cpan@​zoffix.com wrote​:

Slightly golfed. The content of the regex character set doesn't
matter, but avoiding the character set avoids the error as well. The
:g and :ignoremark must be combined together.

<Zoffix> m​: "a" ~~ m​:g​:ignoremark/<[á]>/
<camelia> rakudo-moar e2ec35​: OUTPUT«===SORRY!===␤chr codepoint cannot
be negative␤»
<Zoffix> m​: "a" ~~ m​:g​:ignoremark/. <[á]>/
<camelia> rakudo-moar e2ec35​: OUTPUT«chr codepoint cannot be negative␤
in block <unit> at <tmp> line 1␤␤»

Was a regex compilation bug. Fixed, and test added to S05-metasyntax/charset.t.

@p6rt p6rt closed this as completed Jul 21, 2016
@p6rt
Copy link
Author

p6rt commented Jul 21, 2016

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

@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