IronRuby.Tests.Tests.ConstantCaching_AutoUpdating1B C# (CSharp) Method

ConstantCaching_AutoUpdating1B() public method

public ConstantCaching_AutoUpdating1B ( ) : void
return void
        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
");
            }
        }
    }
Tests