From: Glenn Jackman Date: 2009-09-15T12:10:07+09:00 Subject: Re: URL format At 2009-09-14 09:40PM, "David A. Black" wrote: > On Tue, 15 Sep 2009, John W Higgins wrote: > > On Mon, Sep 14, 2009 at 5:58 PM, Re BR wrote: > > > >> I have the following hash myhash > >> { "inter" => "team", "shirt" => "stripe" } > >> > >> desired output > >> > >> inter=team&shirt=stripe > > > > hsh = { "inter" => "team", "shirt" => "stripe" } > > hsh.to_a.map{|e| e.join('=')}.join('&') # 'inter=team&shirt=stripe' > > >> hsh = { "inter" => "team", "shirt" => "stripe" } > >> hsh.map {|entry| entry.join("=") }.join("&") > => "shirt=stripe&inter=team" I'm surprised that the URI module doesn't have a method to handle it. -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous