On Fri, Jun 17, 2016 at 11:12:39PM +0000, Eric Wong wrote: > The following also breaks the opt_case_dispatch optimization so > it becomes a linear scan, but it still avoids allocating: > > case value.class.to_s > when "String".freeze, "Symbol".freeze > when "Array".freeze > something > else > something_else > end Huh. I didn't know adding the `freeze` would kill the optimization. Seems like we could fix that, though I'm not sure why anyone would do this. You can't access the strings anyway so freezing seems pointless (maybe even warning worthy?) -- Aaron Patterson http://tenderlovemaking.com/ -- --- You received this message because you are subscribed to the Google Groups "Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.