public void BlockReturnOptimization6() {
StackUnwinder.InstanceCount = 0;
TestOutput(@"
def make_block(&b); b; end
def foo
b = make_block { return 123 }
l = lambda { b.call }
l.call
'unreachable'
end
puts foo
", @"
123
");
Assert(StackUnwinder.InstanceCount == 1);
}