From: Fukumoto Atsushi Date: 2003-03-18T22:00:08+09:00 Subject: Re: Accessing hash values sorted by their keys >> BZ> puts h[h.keys.sort] >> >> oh, sorry! this not work because hash key can be an array and >> matz don't implemented alternative method because he don't have >> a vivid name for it. so Actually he has, and he has three. if h.respond_to? :select # 1.7 or later puts(*h.select(*h.keys.sort)) else puts(*h.indices(*h.keys.sort)) or puts(*h.indexes(*h.keys.sort)) end FUKUMOTO Atsushi fukumoto@imasy.or.jp