Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make for-loops work in blasts

  • Loading branch information...
commit 21aca0172ff0fa4d1779098b79af86720a3a1663 1 parent 341faf9
@sorear authored
Showing with 12 additions and 2 deletions.
  1. +10 −0 src/niecza
  2. +2 −2 test2.pl
View
10 src/niecza
@@ -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
4 test2.pl
@@ -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";
Please sign in to comment.
Something went wrong with that request. Please try again.