From: Jens -- Date: 2008-12-09T03:20:31+09:00 Subject: Re: string to hash > > def nested_hash(string, val) > string.split(/\./).reverse.inject(val) { |accum, val| { val.to_sym > => accum } } > end > > p nested_hash("a.b.c.d", 123) Hmmmmmm ... that wasn't as hard as I expected it. Anyway I am impressed how fast that has been solved. Thanks a lot David! -- Posted via http://www.ruby-forum.com/.