From: Julian Leviston Date: 2005-09-11T23:48:06+09:00 Subject: Re: Why? Blocks You ROCK :-) Man THANNNNKKKSSSS :) It's gonna take me a little bit of study to work out blocks, lambdas and Proc objects! Far out. But how awesome that Ruby can do that. Awesome! I'm like excited as... :) Every time I come up against a new problem domain, I get these awesome answers from these awesome people! {BIG VIRTUAL HUGS} thanks guys. Julian. On 09/09/2005, at 12:52 PM, Jamis Buck wrote: > On Sep 8, 2005, at 8:49 PM, Julian Leviston wrote: > > >> Why can I not do this: >> >> c = [1,2,3,4,5,6,6,7,8,10] >> b = {|aVal| aVal / 5 == 0} >> d = c.select(b) >> >> I would like to store sections of code so I don't have to repeat >> myself... >> > > b = Proc.new {|aVal| aVal / 5 == 0} > d = c.select(&b) > > - Jamis > > >