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

RubyBlocks6() public method

Return, yield and retry in a method.
public RubyBlocks6 ( ) : void
return void
        public void RubyBlocks6() {
            TestOutputWithEval(@"
def do_until(cond)
  if cond then #<return#> end
  #<yield#>
  #<retry#>
end

i = 0
do_until(i > 4) do
  puts i
  i = i + 1
end
", @"
0
1
2
3
4
"
            );
        }
Tests