File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
use v6 ;
2
2
use Test ;
3
3
4
- plan 41 ;
4
+ plan 45 ;
5
5
6
6
{
7
7
my @ result = <a b c d e f g >. hyper . map ({ $ _ . uc });
@@ -162,3 +162,12 @@ dies-ok { sink (1..1000).hyper.grep: { die } },
162
162
}
163
163
is $ got , 3 , ' for <a b c>.hyper { } actually iterates' ;
164
164
}
165
+
166
+ # RT #130576
167
+ is ([+ ] (1 .. 100 ). hyper ), 5050 ,
168
+ ' Correct result for [+] (1..100).hyper' ;
169
+ is ([+ ] (1 .. 100 ). hyper . grep (* != 22 )), 5028 ,
170
+ ' Correct result for [+] (1..100).hyper.grep(* != 22)' ;
171
+ is ([+ ] (1 .. 100 ). grep (* != 22 ). hyper ), 5028 ,
172
+ ' Correct result for [+] (1..100).grep(* != 22).hyper' ;
173
+ is (^ 100 . hyper . elems ), 100 , ' .hyper.elems works' ;
Original file line number Diff line number Diff line change 1
1
use v6 ;
2
2
use Test ;
3
3
4
- plan 30 ;
4
+ plan 34 ;
5
5
6
6
{
7
7
my @ result = <a b c d e f g >. race . map ({ $ _ . uc });
@@ -141,3 +141,12 @@ dies-ok { sink (1..1000).race.grep: { die } },
141
141
}
142
142
is $ got , 3 , ' for <a b c>.race { } actually iterates' ;
143
143
}
144
+
145
+ # RT #130576
146
+ is ([+ ] (1 .. 100 ). race ), 5050 ,
147
+ ' Correct result for [+] (1..100).race' ;
148
+ is ([+ ] (1 .. 100 ). race . grep (* != 22 )), 5028 ,
149
+ ' Correct result for [+] (1..100).race.grep(* != 22)' ;
150
+ is ([+ ] (1 .. 100 ). grep (* != 22 ). race ), 5028 ,
151
+ ' Correct result for [+] (1..100).grep(* != 22).race' ;
152
+ is (^ 100 . race . elems ), 100 , ' .race.elems works' ;
You can’t perform that action at this time.
0 commit comments