Am Wed, 28 Jan 2004 02:22:05 +0900
schrieb ts <decoux / moulon.inra.fr>:

> >>>>> "b" == benny  <linux / marcrenearns.de> writes:
> 
> b> conclusion: no argument against "<<" / "+" for hashs?
> 
>  Well, it's more : no arguments for Hash#<< and Hash#+
> 
> moulon% ruby -e 'p "aa"<<"bb"'
> "aabb"
> moulon%
>  
> moulon% ruby -e 'p ["aa"]<<"bb"'
> ["aa", "bb"]
> moulon% 
> 
>  Now try the same with an Hash (order is given by the hash value, and not
>  by the last element added)
> 
I read somewhere that the result of the "shift" method is unpredictable because there is no fixed
order in hashes so it shouldn't matter IMHO. or did I get you wrong?

{"a" => "b"} << {"c" => "d"} 	#-> {"a" => "b", "c" => "d"} 
{"a" => "b"} << "c"  #-> error


> 
> Guy Decoux
> 
>