From: "Victor H. Goff III" Date: 2008-08-24T10:13:40+09:00 Subject: Re: How to create a block consisting of multiple lines. ------=_Part_51855_7197653.1219540663805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline class Person def hi(inputproc) inputproc.call end end Person.new.hi lambda { puts 'wow1' puts 'wow2' } On Sat, Aug 23, 2008 at 8:03 PM, Raj Singh wrote: > This works. > > class Person > def hi(inputproc) > inputproc.call > end > end > > Person.new.hi lambda { puts 'wow1'; puts 'wow2'} > > However when I try to split the code inside block in multiple line the > code does NOT work anymore. > > This does NOT work. > > class Person > def hi(inputproc) > inputproc.call > end > end > > Person.new.hi lambda do > puts 'wow1' > puts 'wow2' > end > > > How do I create a proc consisting of multiple lines of code. > -- > Posted via http://www.ruby-forum.com/. > > -- Warmest Regards, Victor H. Goff III Voice (218) 206-2470 ------=_Part_51855_7197653.1219540663805--