michael@0: if (typeof schedulegc != 'undefined') michael@0: schedulegc(11); michael@0: function foo(n) { michael@0: if (n == 10) michael@0: foo.apply = function(a, b) { return b[0]; } michael@0: return n; michael@0: } michael@0: function bar() { return foo.apply(null, arguments); } michael@0: for (var i = 0; i < 20; i++) michael@0: assertEq(bar(i), i);