Guest User

Untitled

a guest
Apr 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. def bar(a,b)
  2. p = Proc.new
  3. puts "bar"
  4. p.call(a,b)
  5. end
  6.  
  7. def foo(a,b)
  8. puts "foo"
  9. bar(a,b) do |c,d| puts "foo's block: #{c},#{d}" end
  10. end
  11.  
  12. foo(1,2)
Add Comment
Please, Sign In to add comment