celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
596 stars 87 forks source link

Response user headers not modified #85

Closed CootCraig closed 11 years ago

CootCraig commented 11 years ago

My patch for https://github.com/celluloid/reel/issues/81

coveralls commented 11 years ago

Coverage Status

Coverage decreased (-2.29%) when pulling 7c510e460764d252db3179420786588b2d762145 on CootCraig:response_user_headers_not_modified into f234c3eca882e68a9b31099dc00f7664740aa2ca on celluloid:master.

tarcieri commented 11 years ago

I went with 898035d9d2c9f7ef1a81bdc494e1cf0e1d8bbd2f instead. It allocates one less hash

CootCraig commented 11 years ago

I went with 898035d instead. It allocates one less hash

Good. Can you explain "It allocates one less hash"? I don't have an understanding of the difference.

tarcieri commented 11 years ago

Doing {}.merge(hash) generates an empty hash literal. The merge function generates a third hash, as merge does not modify the original hash (but {}.merge! would