From: Intransition Date: 2010-05-05T23:42:02+09:00 Subject: Using array instead of hash and still have efficient cross-referencing Have a look at this class: http://github.com/proutils/lemon/blob/master/lib/lemon/snapshot.rb I am storing a collection of OfModule instances in a hash (@modules) indexed by the modules they correspond to. I'd rather just use an array, since that is the basic intent. But I ran into difficulty when implementing the #- method, which led me to use the hash instead. Is there an efficient way to implement the #- method if @modules were an array instead of a hash? Feel free to offer any other critiques of this code too, btw. trans.