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

Singletons1_Test() public method

public Singletons1_Test ( string className, string inherits ) : void
className string
inherits string
return void
        public void Singletons1_Test(string/*!*/ className, string inherits) {
            TestOutput(String.Format(@"
class {0} {1}
end

x, y = {0}.new, {0}.new

class << x
  def foo; 1; end
end

class << y
  def foo; 2; end
end

p x.foo, y.foo
", className, inherits), 
@"
1
2
");
        }
Tests