simon@diogenes:~$ irb irb(main):001:0> def foo irb(main):002:1> yield irb(main):003:1> end => nil irb(main):004:0> foo { puts "Yay!" } Yay! => nil