You also probably should use == and not eql?
http://probablycorey.wordpress.com/2008/02/26/ruby-equality-equal-eql-and/
-Matt
On Wed, Oct 29, 2008 at 1:23 PM, John Bresnik <[EMAIL PROTECTED]> wrote:
>
>> measures_full.each do |key, value|
>> ### This is where things fall apart ###
>> if value.eql? vals[0]
>> puts vals[0]
>> prop = "#{key} - #{value}|#{vals[1]}|#{vals[2]}|#{vals[3]}|
>> #{vals[4]}|#{vals[5]}|#{vals[6]}|#{vals[7]}|#{vals[8]}|#{vals[9]}"
>> puts prop
>> break
>> else
>> prop = line
>> break
>> end
>> end
>
>
> 'break' will leave the iteration, maybe you meant to use 'next' there
> which jumps to the next iteration..
>
> ?
>
>> measures_full.each do |key, value|
>> ### This is where things fall apart ###
>> if value.eql? vals[0]
>> puts vals[0]
>> prop = "#{key} - #{value}|#{vals[1]}|#{vals[2]}|#{vals[3]}|
>> #{vals[4]}|#{vals[5]}|#{vals[6]}|#{vals[7]}|#{vals[8]}|#{vals[9]}"
>> puts prop
>> next
>> else
>> prop = line
>> next
>> end
>> end
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---