public void ConstantCaching_Unqualified3() {
Runtime.Globals.SetVariable("C", 1);
TestOutput(@"
module M
$M = self
class ::Object
i = 0
while i < 3
p C # tested cache
$M.const_set(:C, 2) if i == 0
$M.send(:remove_const, :C) if i == 1
i += 1
end
end
end
", @"
1
2
1
");
}