Good work. Thanks Jeremy!
On Apr 9, 9:42 am, "Blake Mizerany" <
blake.mizer...@gmail.com> wrote:
> K. Symbol params are back in thanks to Jeremy and his helpful tidbit.
>
>
>
>
> On Thu, Apr 3, 2008 at 2:47 PM, Jeremy Evans <
jeremyeva...@gmail.com> wrote:
>
> > On Apr 2, 12:36 am, "Blake Mizerany" <
blake.mizer...@gmail.com> wrote:
> > > Adam,
> > > It's about 2 things:
>
> > > 1. Converting every params hash to symbolize slows down request
> > times.
> > > Not a biggie for most of us but a benifit of not using them
> > > 2. Because symbols are not garbage collected, blindly symbolizing
> > keys
> > > means that your open to an attack where someone sends random params keys
> > and
> > > eats up memory.
>
> > > I'm looking into another way to get them back without using the bulky
> > HWIA.
>
> > > Please let me know any ideas.
>
> > You can get a cheap version of a hash that accepts symbols without
> > HWIA:
>
> > hwia = Hash.new{|h,k| h[k.to_s] if Symbol === k}
>
> > Jeremy
>
> --
> Blake Mizerany