From: nobu.nokada@... Date: 2002-12-02T10:27:18+09:00 Subject: Re: MultiMap Hi, At Mon, 2 Dec 2002 10:03:13 +0900, Roman Rytov wrote: > def store (key, value) > if !super[key] > dat = Array.new > super[key]=dat #* > end > super[key].push(value) > end > > For some reason it doesn't work. I found by logging that even after line > * if I call super[key] I still get nil. What's wrong with the code? `super' invokes the same name method of superclass. def store(key, value) (self[key] ||= []).push(value) end -- Nobu Nakada