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

BlockReturnOptimization4() public method

An unwinding exception is thrown if any frame is called w/o a block.
public BlockReturnOptimization4 ( ) : void
return void
        public void BlockReturnOptimization4() {
            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 == 1);
        }
Tests