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

Some non-alphanumeric ranges don't work #1803

Closed
p6rt opened this issue Jun 2, 2010 · 6 comments
Closed

Some non-alphanumeric ranges don't work #1803

p6rt opened this issue Jun 2, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 2, 2010

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

Searchable as RT75526$

@p6rt
Copy link
Author

p6rt commented Jun 2, 2010

From david.green@telus.net

Certain ranges with endpoints that aren't 0-9, A-Z don't work​:

  say <@​>..<Z>
  say <á>..<é>

The code goes into an infinite loop or maybe just a very long one...

@p6rt
Copy link
Author

p6rt commented Jun 10, 2010

From js.brighton.uk@gmail.com

Hi

I discovered this a few days ago when messing around. My program tried to a
create a list (" " .. " "), which I assumed would be equal to (" "). However
it actually created an infinite list and sat there. Trying to do say " " ..
" " runs out of memory after a while.

I went onto #perl6 and after a short chat, agreed to send a bug report. I
did try to do that, but I've just checked and I don't think it made it. So
sorry if this is a duplicate.

This was with the latest Rakudo pulled down from git. I've just updated and
rebuild and it still happens. I've also found it to happen with various
combinations involving whitespace and empty strings .

I've added some extra information below. From the chat on Perl 5, I think
this will be more than enough for you guys to identify the issues. However
feel free to ask for more information. I'm also happy to contribute some
tests, etc., if someone points me in the right direction.

Regards
Johnathan

== Here are some tests.
===The first ones return something straight away​:

js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "A" .. "Z"'
ABCDEFGHIJKLMNOPQRSTUVWXYZ
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "A" .. "A"'
A
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "A" .. " "'

js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "A" .. ""'

js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "A" .. "\t"'

js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "something\t" .. "something "'
something

===These ones hang around for a long time (I didn't wait for them to run out
of memory this time)​:

js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say " " .. " "'
^C
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say " " .. "A"'
^C
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "" .. ""'
^C
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "" .. "A"'
^C
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "\t" .. "A"'
^C
js@​arctic​:~/dev/rakudo$ ./perl6 -e 'say "\t" .. "\t"'
^C

===The top of git log​:

commit f50c35907a7d185cb4678c32914e9e0b6f631c05
Author​: Jonathan Worthington <jnthn@​jnthn.net>
Date​: Thu Jun 10 00​:36​:11 2010 +0200

  When we write my ($x is rw) := 42, make sure that we don't try and
re-apply

@p6rt
Copy link
Author

p6rt commented Jun 12, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/range-basic.t

commit ac7fc85b7ce813eb00872b9bafeeec025783b8e2
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sat Jun 12 11​:35​:25 2010 +0000

  [t/spec] unfudge tests for RT #​75526
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31209 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S03-operators/range-basic.t b/t/spec/S03-operators/range-basic.t
index 0b92ef1..ef0bb39 100644
--- a/t/spec/S03-operators/range-basic.t
+++ b/t/spec/S03-operators/range-basic.t
@@ -162,7 +162,6 @@ nok 'h' ~~ 'b'..'g',    "not 'h' ~~ 'b'..'g'";
 nok 0 ~~ 'a'..'g',      "not 0 ~~ 'a'..'g'";
 
 # RT#75526: [BUG] Some non-alphanumeric ranges don't work
-#?rakudo skip 'these tests hang forever'
 {
     ok ' ' ~~ ' '..' ', "' ' ~~ ' '..' '";
     ok ' ' ~~ ' '..'A', "' ' ~~ ' '..'A'";

@p6rt
Copy link
Author

p6rt commented Jun 12, 2010

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

@p6rt
Copy link
Author

p6rt commented Jun 12, 2010

From @moritz

Thanks for your reports, it's fixed now, and tested in
t/spec/S03-operators/range-basic.t.

@p6rt
Copy link
Author

p6rt commented Jun 12, 2010

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

@p6rt p6rt closed this as completed Jun 12, 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