From: Tim Date: 2008-02-03T09:09:56+09:00 Subject: Why is my var undefined? I'm new to ruby and I have the following code: index=0 unsorted_array.each do |value| if index==0 smallest=value smallest_index=0 elsif value