michael@0: // Don't assert. michael@0: gczeal(2,1); michael@0: eval("(function() { " + "\ michael@0: var g1 = newGlobal('same-compartment');\ michael@0: function test(str, f) {\ michael@0: var x = f(eval(str));\ michael@0: assertEq(x, f(g1.eval(str)));\ michael@0: }\ michael@0: test('new RegExp(\"1\")', function(r) assertEq('a1'.search(r), 1));\ michael@0: " + " })();"); michael@0: eval("(function() { " + "" + " })();");