fork download
  1. def f
  2. return to_enum(__method__).first unless block_given?
  3. yield :yield
  4. p :end
  5. end
  6.  
  7. p [1, f]
  8. p [2, f{4}]
Success #stdin #stdout 0.01s 8032KB
stdin
Standard input is empty
stdout
[1, :yield]
:end
[2, :end]