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

Scenario_RubyBlockArgs6() public method

public Scenario_RubyBlockArgs6 ( ) : void
return void
        public void Scenario_RubyBlockArgs6() {
            TestOutput(@"
class C
  def to_a
    [1,2]
  end
end

def baz
  yield C.new
end
baz { |a,b| p b }

class C
  def to_ary
    1
  end
end
baz { |a,b| p b } rescue p $!

class C
  def to_ary
    [3,4]
  end
end
baz { |a,b| p b }
", @"
nil
#<TypeError: C#to_ary should return Array>
4
");
        }
        
Tests