SHOW:
|
|
- or go back to the newest paste.
1 | def wrap(p, &block) | |
2 | - | Array.new(2) { c }.insert(1, Proc.new ).compact |
2 | + | Array.new(2) { c }.insert(1, Proc.new ).compact.each {|e| e.call } |
3 | end | |
4 | ||
5 | - | wrap(Proc.new { toggle_method }) { sandwich_filling }.each {|e| e.call } |
5 | + | wrap(Proc.new { toggle_method }) { sandwich_filling } |