From: Daniel Finnie Date: 2008-04-23T09:15:37+09:00 Subject: Re: Extending Hast class with custom [] []= methods Hi, You can use super and/or alias: class MyHash < Hash def [] key super(key.downcase) end end Dan On Tue, Apr 22, 2008 at 8:01 PM, Iñaki Baz Castillo wrote: > El Miércoles, 23 de Abril de 2008, David A. Black escribió: > > > A better way is to > > write a module, and then use it selectively for the hashes that need > > it: > > > > module CaseInsensitiveLookup > > def [](key) > > Yes, but my question is what to do into that: > def [](key)" method > ... > end > > since the original code is written in C and I don't know which attributes > should I use to access to keys and values. > > -- > Iñaki Baz Castillo > >