Comparing Consecutive Values in an Array Without Using Indices in Ruby