Actions
Feature #19118
closedAllow numbered arguments to be inherited by block
Feature #19118:
Allow numbered arguments to be inherited by block
Status:
Closed
Assignee:
-
Target version:
-
Description
Each these examples does not work as I would have hoped - each of them evaluates to puts(nil).
def foo
yield
end
[1,2,3].each do
Process.wait fork { puts(_1) }
end
[1,2,3].each do
Thread.new { puts(_1) }.join
end
[1,2,3].each do
foo { puts(_1) }
end
Is it possible for numbered parameters to be inherited if the inner block is yielded with no arguments ?
Thanks!
Actions