Guest User

Untitled

a guest
May 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def inspect_block(&block)
  2. puts block.class
  3. end
  4.  
  5. # using the inline form
  6. inspect_block { puts "hello" } # => Proc
  7.  
  8. # using the longhand form
  9. inspect_block do
  10. puts "hello"
  11. end # => Proc
Add Comment
Please, Sign In to add comment