Ezra Zygmuntowicz wrote:
> On Dec 21, 2005, at 12:08 PM, Payton Swick wrote:
>>
>> array = %w(a B c d Cool e f G)
>> array.unshift(array.slice!(array.index(array.find { |i| i =~ /cool/ i 
>> }))) if array.find { |i| i =~ /cool/i }
>>
>> Better/cleaner/shorter ways to do it?
> 
>  array.unshift(array.delete_at(array.index("Cool")))


array.sort_by{|x| x=~/cool/i ? 0 : 1}