fork download
  1. def test1
  2. Proc.new { return "test1" }.call
  3. end
  4.  
  5. def test2(p)
  6. p.call
  7. end
  8.  
  9. puts test1
  10.  
  11. p = Proc.new { return "test2" }
  12. puts test2(p)
Runtime error #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
test1