From: Ben Lovell Date: 2009-06-18T04:17:52+09:00 Subject: Re: lambda and a Proc --0016e6d59e1f9b4c53046c90252c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Jun 17, 2009 at 7:15 PM, aidy wrote: > Hi, > > I am a bit unsure on what the difference is between a lambda and a > Proc? > > hello = lambda { puts('aidy, aidy, aidy' ) } > hello.call > > hello = Proc.new{ puts('aidy, aidy, aidy' ) } > hello.call > > Cheers > > Aidy > > There is a great description of the differences on wikipedia: http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Understanding_blocks.2C_Procs_and_methods Give that a read. Ben --0016e6d59e1f9b4c53046c90252c--