Hi --

On Wed, 26 May 2004, Zach Dennis wrote:

> I am having trouble with my delete_if block. 
> 
> prop_array.delete_if{ |p|
> 	(p=~/#{attr}/).to_i > 0; }
> 
> and i have tried the longer version
> 
> prop_array.delete_if{ |p|
> 	m = (p=~/#{attr}/).to_i
> 	m > 0; }
> 
> and i have tried
> 
> prop_array.delete_if{ |p|
> 	(p=~/#{attr}/) != nil }
> 
> It deletes every element, even when m == 0 or m == nil. Any ideas? Thanks,

I'm not sure exactly what you're trying to do.  The examples do
different things.  Can you give sample before and after arrays?  And
what's in attr?


David

-- 
David A. Black
dblack / wobblini.net