public void ConstantCaching_AutoUpdating1B() {
if (_driver.PartialTrust) return;
var autoloaded = @"
class X
D = 1
end
$B.const_set(:C, X)
$A.send(:remove_const, :B)
";
using (_driver.MakeTempFile("file", ".rb", autoloaded)) {
TestOutput(@"
module A
$A = self
module B
$B = self
autoload(:C, $file)
end
end
i = 0
while i < 2
puts defined?(A::B::C::D) # tested cache
i += 1
end
", @"
constant
nil
");
}
}
}