def test1 Proc.new { return "test1" }.call end def test2(p) p.call end puts test1 p = Proc.new { return "test2" } puts test2(p)