def foo return Proc.new { puts 123 } end def bar(block) block.call end bar(foo)