Hi --

On Thu, 23 Jan 2003, Daniel Carrera wrote:

> I think that there should be a Hash#+ method, aking to Array#+.
>
> array = [ "Daniel" ]
> array + [ "Carrera" ]  # -> [ "Daniel", "Carrera" ]
>
> hash = { "first" => "Daniel" }
> hash + { "last" => "Carrera" } # -> {"first" => "Daniel",
>                                #     "last" => "Carrera"  }
>
> Ditto for Hash#-.

Have a look at the thread starting at http://www.ruby-talk.org/59777
for some recent discussion of this.  In 59794 Matz says:

  No information lost by String#+ or Array#+, but Hash#update may lose
  the value.  That's why I rejected the name "+".  It is possible to
  provide the non destructive "update" under different name.  Good
  name?


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav