Logan Capaldo wrote:
> Alternative decandence:
>
> class Array
>   def to_hsh
>     require 'enumerator'
>     to_enum(:each_slice, 2).to_a.inject({}) { |h, (k, v)| h.update(k=>v) }
>   end
> end
>
> %w( a b c d ).to_hsh

Logan, I love you! Just the kind of example I've been looking for
--another potential use for a #to_h.

See: http://rcrchive.net/rcr/show/348.

T.