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