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

Rakudo allows reversed ranges in character classes in regexes, shouldn't #1458

Closed
p6rt opened this issue Dec 29, 2009 · 7 comments
Closed

Rakudo allows reversed ranges in character classes in regexes, shouldn't #1458

p6rt opened this issue Dec 29, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Dec 29, 2009

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

Searchable as RT71702$

@p6rt
Copy link
Author

p6rt commented Dec 29, 2009

From @masak

<masak> mberends​: I made great strides with GGE yesterday on the bus.
<mberends> \o/
<masak> the funniest things to implement are things marked TODO in PGE. :)
<masak> rakudo​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> rakudo 8dc189​: foo␤
<masak> GGE dies on the reverse range in the enum char class.
<masak> ooh!
* masak submits rakudobug
<masak> :P
<masak> ng​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> ng 06c947​: foo␤
<masak> heh.

@p6rt
Copy link
Author

p6rt commented Dec 29, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S05-metasyntax/charset.t

commit 8cf9ce6e75dec38eaf2e2c5c5474bc1336d468d2
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Tue Dec 29 17​:02​:28 2009 +0000

  [t/spec] Test for RT 71702​: lethal reverse range in charset
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;29417 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S05-metasyntax/charset.t b/t/spec/S05-metasyntax/charset.t
index 1aeba3f..329348c 100644
--- a/t/spec/S05-metasyntax/charset.t
+++ b/t/spec/S05-metasyntax/charset.t
@@ -12,7 +12,7 @@ be valid perl6.
 
 =end pod
 
-plan 25;
+plan *;
 
 if !eval('("a" ~~ /a/)') {
   skip_rest "skipped tests - rules support appears to be missing";
@@ -60,6 +60,12 @@ ok( "foo" ~~ /<[f] #`[comment] + [o]>/, 'comment embedded in charset works' );
 #?rakudo skip 'large \\x char spec in regex (RT #67122) (noauto)'
 ok "\x[10001]" ~~ /<[\x10000..\xEFFFF]>/, 'large \\x char spec';
 
+#?rakudo todo 'RT 71702: lethal reverse range in charset'
+eval_dies_ok( "'RT 71702' ~~ /<[d..b]>? RT/",
+    'reverse range in charset is lethal (RT 71702)' );
+
 }
 
+done_testing;
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Dec 29, 2009

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

@p6rt
Copy link
Author

p6rt commented Aug 2, 2010

From @bbkr

[13​:26] <bbkr> std​: say "foo" ~~ /<[d..b]>? foo/
[13​:26] <p6eval> std 31887​: OUTPUT«ok 00​:01 119m␤»

I'm not sure if reversed ranges are allowed in current spec, so I leave
it unchanged

@p6rt
Copy link
Author

p6rt commented Apr 20, 2012

From @jnthn

On Tue Dec 29 03​:14​:18 2009, masak wrote​:

<masak> mberends​: I made great strides with GGE yesterday on the bus.
<mberends> \o/
<masak> the funniest things to implement are things marked TODO in PGE. :)
<masak> rakudo​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> rakudo 8dc189​: foo␤
<masak> GGE dies on the reverse range in the enum char class.
<masak> ooh!
* masak submits rakudobug
<masak> :P
<masak> ng​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> ng 06c947​: foo␤
<masak> heh.

Dies now​:

say "foo" ~~ /<[d..b]>? foo/
Illegal reversed character range in regex​: d..b at line 1, near ">? foo/\n"

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jun 2, 2012

From @diakopter

On Fri Apr 20 06​:02​:21 2012, jnthn@​jnthn.net wrote​:

On Tue Dec 29 03​:14​:18 2009, masak wrote​:

<masak> mberends​: I made great strides with GGE yesterday on the
bus.
<mberends> \o/
<masak> the funniest things to implement are things marked TODO in
PGE. :)
<masak> rakudo​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> rakudo 8dc189​: foo␤
<masak> GGE dies on the reverse range in the enum char class.
<masak> ooh!
* masak submits rakudobug
<masak> :P
<masak> ng​: say "foo" ~~ /<[d..b]>? foo/
<p6eval> ng 06c947​: foo␤
<masak> heh.

Dies now​:

say "foo" ~~ /<[d..b]>? foo/
Illegal reversed character range in regex​: d..b at line 1, near ">?
foo/\n"

Tagging testneeded.

/jnthn

19​:27 <+dalek> roast​: 6a03ec5 | diakopter++ | S05-mass/rx.t​:
19​:27 <+dalek> roast​: test RT #​71702. resolves ticket
19​:27 <+dalek> roast​: review​:
Raku/roast@6a03ec52c3

@p6rt
Copy link
Author

p6rt commented Jun 2, 2012

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

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