# File lib/array_extensions.rb, line 24 def to_hash {}.affect do |hash| self.each { |pair| hash[pair.first] = pair.last } end end