From: Jeremy Weiskotten Date: 2008-03-12T08:32:17+09:00 Subject: Re: shortcut for x = [x] unless x.is_a?(Array) Aryk Grosz wrote: > Is there any prettier or cleaner way to write > > x = [x] unless x.is_a?(Array) x = [x].flatten Although I suspect the x = Array(x) method would be faster. -- Posted via http://www.ruby-forum.com/.