From: Patrick Bennett Date: 2002-08-16T13:31:44+09:00 Subject: Re: Hello everyone! procs can be used as standalone 'closures' and passed around/called as callable functions (via the returned proc object). ie: def testFunc( obj ) obj.call end bleah = proc { puts "something" } testFunc( bleah) ---- something They can substitute as blocks by passing the proc (with a preceeding &) as a method parameter to something expecting a block. This turns the proc into a block for that method. ie: foo = proc { |val| puts val } a = [1,2,3] a.each( &foo ) ----- 1 2 3 I'm missing a couple other variations, but you should get the idea. You might want to dig into the Thomas/Hunt book a bit more. Robert Warning wrote: > I'm just learning ruby and so far everything has been great (using the > Thomas and Hunt book), but I don't quite understand how proc objects > (and its call method) relate to code blocks. If anyone could explain I > would greatly appriciate it. >