From: Michael Hollins Date: 2007-07-31T08:25:02+09:00 Subject: Re: array.include? Jeffrey Bowen wrote: > if @status_array.include? @status_number > else > @status_array << @status_number > end > > I'm using the above to append an array if it does not > include @status_number. Is there an include?-not > function that would eliminate the else? Or another > way to do the same thing? The simplest rewrite of your code is: if !@status_array.include? @status_number @status_array << @status_number end