This could also be written as a single line: `path.split(".").inject(to_hash) { |current, key| current[key] }`. Not sure which one I prefer, although I'm slightly leaning towards not using temp variables.