Ruby chacun_with_object

%w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase }
Dr. Phil