From: Todd Benson Date: 2008-02-03T14:14:02+09:00 Subject: Re: Why is my var undefined? On Feb 2, 2008 11:05 PM, Todd Benson wrote: > a.inject(a.first) {|m, e| e < m ? e : m} > a.each_with_index {|v, i| s_indexes << i if v == a.min} Sorry, these lines are supposed to be... smallest = a.inject(a.first) {|m, e| e < m ? e : m} a.each_with_index {|v, i| s_indexes << i if v <= smallest} Todd