I
Iñaki Baz Castillo
Hi, I'd like a faster Ruby class same as Hash but in which key and value ar=
e=20
insensitive, so:
=2D---------------------------------
params =3D InsensitiveHash.new
params["q"] =3D 0.5
params["transport"] =3D "TCP"
params["Q"]
=3D> 0.5
params["Transport"] =3D=3D "tcp"
=3D> true
=2D---------------------------------
It will be used extensively so I need it being very fast. I'm thinking in=20
implementing it as a new Ruby class in C, modifying Hash class.
Do you think it's feasible? Any suggestion?
Thanks a lot.
PD: Where is the C file defining Hash class? I read "hash.c" in Hash=20
documentation:
http://www.ruby-doc.org/core/classes/Hash.html
but I can't find it in Ruby libs directory.
=2D-=20
I=C3=B1aki Baz Castillo
e=20
insensitive, so:
=2D---------------------------------
params =3D InsensitiveHash.new
params["q"] =3D 0.5
params["transport"] =3D "TCP"
params["Q"]
=3D> 0.5
params["Transport"] =3D=3D "tcp"
=3D> true
=2D---------------------------------
It will be used extensively so I need it being very fast. I'm thinking in=20
implementing it as a new Ruby class in C, modifying Hash class.
Do you think it's feasible? Any suggestion?
Thanks a lot.
PD: Where is the C file defining Hash class? I read "hash.c" in Hash=20
documentation:
http://www.ruby-doc.org/core/classes/Hash.html
but I can't find it in Ruby libs directory.
=2D-=20
I=C3=B1aki Baz Castillo