From: Gergely Kontra Date: 2004-05-04T21:55:36+09:00 Subject: Re: model for my problem (network simulator) On 0504, Robert Klemme wrote: > Nope, that's not the same: > irb(main):001:0> h=Hash.new {[]} > irb(main):002:0> h[1] > irb(main):003:0> h > => {} > irb(main):004:0> h=Hash.new {|h,k| h[k]=[]} > irb(main):005:0> h[1] > irb(main):006:0> h > => {1=>[]} > Your solution makes the idiom "h[key] << something" unusable since all > those arrays never make it into the hash. Oh, yes, I run into the problem, and this is the weird case, where h[key] << something and h[key] <<= something is different... Gergo -- +-[ Kontra, Gergely PhD student Room IB113 ]---------+ | http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy | | Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" | +-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+