From: Jon Baer Date: 2006-01-27T07:55:41+09:00 Subject: Re: Subselecting hash back into hash (oneliner?) Nice .. well that works :-) but in the constructor can you tell me what "*" would literally "mean"? Does this just take only an Array obj or could you place any object in there w/ public attributes/methods? (Was this covered in pick-axe somewhere I missed?) Thank you, much appreciated ... - Jon On Jan 26, 2006, at 3:06 PM, James Edward Gray II wrote: > >> h1 = {"foo1"=>"bar1", "foo2"=>"bar2"} > => {"foo1"=>"bar1", "foo2"=>"bar2"} > >> h2 = Hash[*h1.select { |k, v| v == "bar2" }.flatten]