Permalink
Browse files

Make for-loops work in blasts

  • Loading branch information...
1 parent 341faf9 commit 21aca0172ff0fa4d1779098b79af86720a3a1663 @sorear committed Jun 17, 2011
Showing with 12 additions and 2 deletions.
  1. +10 −0 src/niecza
  2. +2 −2 test2.pl
View
@@ -23,6 +23,16 @@ use RxOp;
use Sig;
use STD;
+augment class NieczaActions {
+method blast($/) {
+ if $<block> {
+ make $<block>.ast;
+ } else {
+ make self.thunk_sub($<statement>.ast.statement_level);
+ }
+}
+}
+
CgOp._register_ops: <
>;
View
@@ -32,8 +32,8 @@
], "can stub then define nested classes";
{
- # my @l = gather for 1,2 { take $_ };
- # is ~@l, "1 2", "gather for works";
+ my @l = gather for 1,2 { take $_ };
+ is ~@l, "1 2", "gather for works";
# eval_dies_ok 'class { has $!foo; has $!foo; }',
# "double attribute declaration caught";

0 comments on commit 21aca01

Please sign in to comment.