Guest User

Untitled

a guest
Jun 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. # File: blocks-15.rb
  2. #
  3. block1 = Proc.new { puts 'I am block #1' }
  4. block2 = Proc.new { puts 'I am block #2' }
  5.  
  6. def foo(b1, b2)
  7. b1.call
  8. b2.call
  9. end
  10.  
  11. puts 'I will now call foo'
  12.  
  13. foo(block1, block2)
Advertisement
Add Comment
Please, Sign In to add comment