From: Adam Groves Date: 2008-02-12T08:43:23+09:00 Subject: nested hash from array of paths Hi, I'm banging my head against the wall with the following problem: array = ["home", "about", "about/history", "about/company", "about/history/part1", "about/history/part2"] I want to build a tree from this array in the form of a nested hash: {"home" => nil, "about => {"history => ["part1" => nil, "part2" => nil]", "company" => nil}} Any ideas as to how best to solve this? Regards Adam -- Posted via http://www.ruby-forum.com/.