From 104f7bd76696e42c0b8a97f3780cabea9a7dd44c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 4 Jan 2011 17:12:22 -0800 Subject: prefer Hash#merge! to Hash#update for consistency It's more likely to be in the method cache since Rack::URLMap uses it and also is more consistent when looking at profiling output against various concurrency models. --- lib/rainbows/event_machine/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/event_machine/client.rb') diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb index 2fc9d03..3312f5d 100644 --- a/lib/rainbows/event_machine/client.rb +++ b/lib/rainbows/event_machine/client.rb @@ -38,7 +38,7 @@ class Rainbows::EventMachine::Client < EM::Connection @env[ASYNC_CALLBACK] = method(:em_write_response) @env[ASYNC_CLOSE] = EM::DefaultDeferrable.new - response = catch(:async) { APP.call(@env.update(RACK_DEFAULTS)) } + response = catch(:async) { APP.call(@env.merge!(RACK_DEFAULTS)) } # too tricky to support pipelining with :async since the # second (pipelined) request could be a stuck behind a -- cgit v1.2.3-24-ge0c7