Greg Hauptmann wrote:
> thanks guys - interesting question for the Rails guys is whether you 
> have to
> explicitly ask for a HashWithIndifference,  i.e. just wondering whether 
> it's
> possible in Rails to ask for a Hash but really get a monkey patched
> HashWithIndiffrence back without it being obvious...

There is no guarantees of getting any "type" back from ANY method in 
ruby..  with rails, you can just convert it to an one if you aren't 
sure..

my_hash = HashWithIndifferentAccess.new(my_hash)


By the way, there is no monkey patching here.. HashWithIndifferentAccess 
is it's own class.  To be considered monkey patching, the Hash class 
itself would be modified to be used in an indifferent fashion..

ilan





-- 
Posted via http://www.ruby-forum.com/.