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

Sequence operator not properly flattening when generator returns more than one element at a time #2276

Closed
p6rt opened this issue Dec 11, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Dec 11, 2010

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

Searchable as RT80574$

@p6rt
Copy link
Author

p6rt commented Dec 11, 2010

From @colomon

colomon​: rakudo​: my @​a := -> { rand, rand } ... *; say @​a[0]
p6eval​: rakudo : OUTPUT«0.594149672283919 0.956055957629484␤»

Output should just be 0.594149672283919, IMO.

Happens with d1e66361f6245569ae936dff33c9515fcaef368e.

--
Solomon Foster​: colomon@​gmail.com
HarmonyWare, Inc​: http://www.harmonyware.com

@p6rt
Copy link
Author

p6rt commented Dec 23, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in S03-sequence/misc.t

commit 5760b39f0a919f15ba8b4faee109f5cae3a29c24
Author​: Kyle Hasselbacher <kyleha@​gmail.com>
Date​: Thu Dec 23 11​:24​:32 2010 -0600

  [S03-sequence] Test for RT 80574

Inline Patch
diff --git a/S03-sequence/misc.t b/S03-sequence/misc.t
index 2998ee3..87c8ef6 100644
--- a/S03-sequence/misc.t
+++ b/S03-sequence/misc.t
@@ -73,6 +73,12 @@ is (1, 2 ... 0, 1 ... 3).join(' '),
     '0 1 2 3',
     'chained sequence with an empty subsequence';
 
+{
+    my @rt80574 := -> { 'zero', 'one' } ... *;
+    #?rakudo todo 'RT 80574'
+    is @rt80574[0], 'zero', 'Generator output is flattened';
+}
+
 done_testing;
 
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Dec 23, 2010

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

@p6rt
Copy link
Author

p6rt commented Mar 16, 2015

From @usev6

This works now (after commit rakudo/rakudo@cd51b3401c):

$ perl6 -e 'my @​a := -> { rand, rand } ... *; say @​a[0]'
0.249321170945563

The existing test was unfudged with commit Raku/roast@6a567f81b9 (together with two other fudged tests).

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Mar 16, 2015

From @usev6

This works now (after commit rakudo/rakudo@cd51b3401c):

$ perl6 -e 'my @​a := -> { rand, rand } ... *; say @​a[0]'
0.249321170945563

The existing test was unfudged with commit Raku/roast@6a567f81b9 (together with two other fudged tests).

I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Mar 16, 2015
@p6rt
Copy link
Author

p6rt commented Mar 16, 2015

@usev6 - 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