Skip to content

Instantly share code, notes, and snippets.

View cassj's full-sized avatar

Caroline Johnston cassj

View GitHub Profile
@cassj
cassj / ruby_proc_test.rb
Created November 19, 2010 15:35
Trying to understand Proc objects, Proc.new, proc, lambda etc.
# see http://mng.iop.kcl.ac.uk/site/node/617 for more notes
def anonymous_block_test()
if block_given?
yield
end
end
anonymous_block_test do
puts "yield runs an anonymous block param"