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

BlockReturnOptimization3() public method

Block return propagates thru user method calls with a block without throwing unwinding exception.
public BlockReturnOptimization3 ( ) : void
return void
        public void BlockReturnOptimization3() {
            StackUnwinder.InstanceCount = 0;
            TestOutput(@"
def f0
  $b = proc { return 123 }
  f1 {}
end

def f1
  f2 {} 
end

def f2 
  f3(&$b)
end

def f3
  yield
end

puts f0
", @"
123
");
            Assert(StackUnwinder.InstanceCount == 0);
        }
Tests