On 10/29/06, dblack / wobblini.net <dblack / wobblini.net> wrote:
> Hi --
>
> On Mon, 30 Oct 2006, Vincent Fourmond wrote:
>
> > Giles Bowkett wrote:
> >
> >> list.reject! {|thing| not list_of_acceptable_values.include?
> >> thing.attribute}
> >>
> >> is there a nicer way to do it?
> >
> > list.select {|thing| list_of_acceptable_values.include? thing.attribute
> > }  ??
> >
> >  But then you need to reassign list, since I don't know of any select!
>
> This would be a nice use for delete_unless.

Cheers, I didn't know about delete_unless. (I did find delete_if.)

-- 
Giles Bowkett
http://www.gilesgoatboy.org