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

SingletonCaching2C() public method

CLR types.
public SingletonCaching2C ( ) : void
return void
        public void SingletonCaching2C() {
            TestOutput(@"
A = System::Collections::ArrayList
class A
  def to_s
    'base'
  end
end

foo, bar = A.new, A.new
puts bar.to_s
puts foo.to_s
def foo.to_s; 'singleton 1'; end
puts bar.to_s
puts foo.to_s
def foo.to_s; 'singleton 2'; end
[bar, foo, nil, 1].each { |x| puts x.to_s }
", @"
base
base
base
singleton 1
base
singleton 2

1
");
        }
Tests