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=F1aki Baz Castillo <ibc / aliax.net> wrote=
:
> El Mi=E9rcoles, 23 de Abril de 2008, David A. Black escribi=F3:
>
> > 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 attribute=
s
>  should I use to access to keys and values.
>
>  --
>  I=F1aki Baz Castillo
>
>