Revision
1263
Author
vincent.isambart@gmail.com
Date
2009-03-30 05:51:26 -0700 (Mon, 30 Mar 2009)

Log Message

I should have kept a little more of Laurent's code for 'for'. Now it
should work fine.

Modified Paths

Diff

Modified: MacRuby/branches/experimental/parse.y (1262 => 1263)


--- MacRuby/branches/experimental/parse.y	2009-03-30 12:32:34 UTC (rev 1262)
+++ MacRuby/branches/experimental/parse.y	2009-03-30 12:51:26 UTC (rev 1263)
@@ -2905,10 +2905,13 @@
 			    }
 			}
 
-			tbl = ALLOC_N(ID, vtable_size(lvtbl->vars) + 3);
+			int args_count = vtable_size(lvtbl->args);
+			int vars_count = vtable_size(lvtbl->vars);
+			tbl = ALLOC_N(ID, args_count + vars_count + 3);
 			tbl[0] = 1; tbl[1] = id;
-			tbl[2] = vtable_size(lvtbl->vars);
-			vtable_tblcpy(tbl+3, lvtbl->vars);
+			tbl[2] = args_count + vars_count;
+			vtable_tblcpy(tbl+3, lvtbl->args);
+			vtable_tblcpy(tbl+3+args_count, lvtbl->vars);
 
 			scope = NEW_NODE(NODE_SCOPE, tbl, $8, args);
 			$$ = NEW_FOR(0, $5, scope);