summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug561359-2.js
blob: 017b9bf3384ab2fa5c4b69bd7dc3fbc1cc9fee12 (plain)
1
2
3
4
5
6
7
8
function f(s) {
    var obj = {m: function () { return a; }};
    eval(s);
    return obj;
}
var obj = f("var a = 'right';");
var a = 'wrong';
assertEq(obj.m(), 'right');