------ art_235747_9342449.1231799426208 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline agreed - slip on my part to use the term - what I meant to refer to was "Some methods return instances of it; some return instances of Hash" - as Ilan pointed out, confirming that Rails can do this to you... On Tue, Jan 13, 2009 at 7:35 AM, Ilan Berci <coder68 / yahoo.com> wrote: > 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 ashWithIndifferentAccess.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/. > > -- Greg http://blog.gregnet.org/ ------ art_235747_9342449.1231799426208--