Kev Jackson wrote:
> Here's one taht I know is possible (I'm sure I've seen it somewhere before)
>
> I have 2 arrays and I'd like to change them into a Hash
> stuff = ["1", "2", "3"]
> Item.column_names.each { |column_name| new_item[column_name] = stuff[?] }
>
> The problem is how to index within the block to move along the stuff
> array, and how to deal with the fact that most of the time the stuff
> array is shorter than the column_names array

stuff = ["1", "2", "3"]
Item.column_names.each_with_index { |column_name, i|
   new_item[column_name] = stuff[i] }