var i = 5 add_global(i, "j") def myFun() { assert_equal(j, 5) } myFun(); def myFun2() { assert_equal(j, 7) } set_global(7, "j") myFun2(); set_global(5, "j") myFun();