On Fri, Jun 17, 2016 at 02:43:54PM -0500, richard schneeman wrote: > I have a PR that removes all those constants in rack.rb in favor of string literals: > https://github.com/rack/rack/pull/1085 Eric, Here's a link to the raw diff if you want to take a look: https://patch-diff.githubusercontent.com/raw/rack/rack/pull/1085.diff Now that I'm reading this patch, removing the constants worries me because of backwards compatibility issues. I think removing the `freeze` is fine, and setting the magic comment to use frozen strings would be good. But removing the constants seems dangerous since other libraries use those constants. Could we just remove the freeze and add the magic comment to that file that defines the constants? > I also found some places where we should still use `.freeze` in a few cases. There are also some other constants buried around the project, this PR is only the main constants. > > Eric & Aaron: on a separate non-rack note, I could use some of your Ruby internals expertise on a performance tuning patch to Sprockets involving `case`. Mostly why is the `case` code not faster than using a hash. Here is the discussion:  > > https://github.com/rails/sprockets/pull/312#issuecomment-226369234 I left a comment. Basically the case statement is doing an is_a? where the hash version is just doing an equality on the class. -- 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.