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

problem with ranges using letters #5188

Closed
p6rt opened this issue Mar 21, 2016 · 5 comments
Closed

problem with ranges using letters #5188

p6rt opened this issue Mar 21, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 21, 2016

Migrated from rt.perl.org#127753 (status was 'rejected')

Searchable as RT127753$

@p6rt
Copy link
Author

p6rt commented Mar 21, 2016

From @MARTIMM

L.s.

REPL code shows

|('az'..'bb')
(az ay ax aw av au at as ar aq ap ao an am al ak aj ai ah ag af ae ad ac
ab bz by bx bw bv bu bt bs br bq bp bo bn bm bl bk bj bi bh bg bf be bd
bc bb)

while I would expect

(az ba bb)

And this

|('x'..'ab')
()

I expected
(x y z aa ab)

Same problem with mixed letters and digits

|('a8'..'b2')
(a8 a7 a6 a5 a4 a3 a2 b8 b7 b6 b5 b4 b3 b2)

I would expect
(a8 a9 b0 b1 b2)

These are alright

|('wt'..'ww')
(wt wu wv ww)

|('b1'..'b5')
(b1 b2 b3 b4 b5)

This is Rakudo version 2016.02-136-g412d9a4 built on MoarVM version
2016.02-25-gada3752
implementing Perl 6.c.

Marcel Timmerman

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

This appears to be a feature, not a bug, as per today's conversation​: http://irclog.perlgeek.de/perl6-dev/2016-07-10#i_12816284

It takes each letter and makes it a range to the corresponding letter on the end point.

To accomplish what you meant, use generate a sequence with .succ method​:

("az", *.succ ... "bb"

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 21, 2016

From @zoffixznet

As per previous comments, I'm closing this as not a bug. Thanks.

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Jul 21, 2016

@zoffixznet - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant