From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-06-25T17:57:33+09:00 Subject: Re: Concatenating Hash's On Wed, 25 Jun 2003 10:45:02 +0200, Robert Klemme wrote: > > def hash_join(h1,h2); h1.dup.update(h2); end > > you could also do > > class Hash; def +(o); dup.update(o); end; end > > h1={1,2,3,4} > h2={"a","b"} > h1 + h2 # => {"a"=>"b", 1=>2, 3=>4} If your hash-tables has differents sizes, I suppose that it will be fastest to merge the smallest into the biggest. Just a thought. -- Simon Strandgaard