Permalink
Browse files

Merge branch 'master' of git://github.com/perl6/roast

  • Loading branch information...
2 parents 38cc5b7 + d1bba41 commit c3b1c0ea66e8523f440189686e0cbd7fde867ef2 @diakopter diakopter committed Jun 1, 2012
Showing with 14 additions and 9 deletions.
  1. +13 −3 S04-statements/gather.t
  2. +0 −3 S09-autovivification/autovivification.t
  3. +1 −3 integration/99problems-21-to-30.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 20;
+plan 21;
# L<S04/The C<gather> statement prefix/>
@@ -141,7 +141,6 @@ plan 20;
'take with multiple arguments .flat tens out';
}
-#?niecza skip 'series'
#?rakudo skip 'nom regression (loops)'
{
my sub grep-div(@a, $n) {
@@ -151,7 +150,7 @@ plan 20;
}
my @evens := grep-div((1...*), 2);
- is ~grep-div(@evens, 3).munch(16), ~grep-div((1...100), 6), "Nested identical gathers";
+ is ~grep-div(@evens, 3)[^16], ~grep-div((1...100), 6), "Nested identical gathers";
}
# RT #77036
@@ -184,5 +183,16 @@ plan 20;
'decontainerization happens (2)';
}
+# Method form of take
+{
+ my @outer = gather {
+ my @l = (1, 2, 3);
+ 5.take;
+ @l.take;
+ 5.take;
+ };
+
+ is ~@outer, "5 1 2 3 5", "method form of take works.";
+}
# vim: ft=perl6
@@ -31,7 +31,6 @@ plan 42;
# Autovification by push, unshift, etc.
# XXX I understand that @array[0].push(...) should autovivify an Array
# in @array[0], but is that also true for a normal scalar?
-#?rakudo skip 'autoviv with push/unshift'
#?niecza skip 'Unable to resolve method push in class Any'
{
my $arrayref;
@@ -41,7 +40,6 @@ plan 42;
isa_ok $arrayref, Array, 'autovivified to Array';
}
-#?rakudo skip 'autoviv with push/unshift'
#?niecza skip 'Unable to resolve method unshift in class Any'
{
my $arrayref;
@@ -52,7 +50,6 @@ plan 42;
# Autovification by push, unshift, etc. of an array/hash element
# L<S09/Autovivification/"push, unshift, .[]">
-#?rakudo skip 'autoviv with push/unshift'
#?niecza skip 'Unable to resolve method push in class Any'
{
my @array;
@@ -135,11 +135,10 @@ sub combination($n, @xs) {
} elsif $n == @xs {
[@xs]
} else {
- (map { [@xs[0],$_] },combination($n-1,@xs[1..*])), combination($n,@xs[1..*])
+ (map { [@xs[0],$_.list] },combination($n-1,@xs[1..*])), combination($n,@xs[1..*])
}
}
-#?rakudo skip 'elements() not implemented in class Range'
#?niecza skip 'hangs'
{
@@ -156,7 +155,6 @@ sub combination($n, @xs) {
[3, 4, 5]), "combinations work.";
}
-#?rakudo skip 'depedendency on combination() from previous section'
#?niecza skip 'hangs'
#?pugs todo
{

0 comments on commit c3b1c0e

Please sign in to comment.