From: Daniel Wislocki Date: 2005-11-04T16:46:41+09:00 Subject: Re: two arguments in a block? You're not actually "passing" v2 anywhere. The |v1, v2| creates two variables, v1 and v2, local to that block. It's the method itself that supplies the values of v1 and v2. Are you sure what you're trying to do is correct? On 11/4/05, Kev Jackson wrote: > Hi, > > I want to pass an array into a block like so > > v2 = [] > object.some_method_that_takes_a_block do | v1, v2| > v2.push v1.action > end > > causes a undefined method push for nil > > the problem is that v2 gets assigned as nil as it gets passed through, > is there any way around this? > > I don't really want to open the original class and try to add a new > method signature (I hope that's not how to get it to accept to variables) > > Kev > >