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

RubyProcArgConversion2() public method

public RubyProcArgConversion2 ( ) : void
return void
        public void RubyProcArgConversion2() {
            AssertOutput(delegate() {
                CompilerTest(@"
class C
  def to_proc; 1; end
end

class D
  def to_proc; lambda { puts 'ok2' }; end
end

1.times(&lambda { puts 'ok1' })
1.times(&C.new) rescue puts $!
1.times(&D.new)
");
            }, @"
ok1
C#to_proc should return Proc
ok2
");
        }
Tests