Modified: MacRuby/trunk/compiler.cpp (2939 => 2940)
--- MacRuby/trunk/compiler.cpp 2009-11-02 22:12:19 UTC (rev 2939)
+++ MacRuby/trunk/compiler.cpp 2009-11-02 23:00:03 UTC (rev 2940)
@@ -4145,7 +4145,13 @@
if (i == rest_pos) {
params.push_back(splatArgFollowsVal);
}
- params.push_back(iter);
+
+ // We can't simply push the direct argument address
+ // because if may have a default value.
+ ID argid = rb_intern(iter->getName().data());
+ Value *argslot = compile_lvar_slot(argid);
+ params.push_back(new LoadInst(argslot, "", bb));
+
++i;
++iter;
}