From: seebs@... (Peter Seebach) Date: 2007-05-04T02:17:07+09:00 Subject: Re: Array to Hash In message , Chris Browne writes: >array = [ nil, "b", nil, nil, nil , "f", "g", nil, nil, "j"] >hash = {} >array.each_with_index { |value, index| hash[index] = value unless ! value } >puts hash.inspect My code was very similar to this. 5 quatloos to the first person to find a hypothetical case where this code produces the wrong answer. -s