event_machine: cleanup confusing assignment
authorEric Wong <normalperson@yhbt.net>
Wed, 19 Dec 2012 03:39:58 +0000 (19 03:39 +0000)
committerEric Wong <normalperson@yhbt.net>
Wed, 19 Dec 2012 03:39:58 +0000 (19 03:39 +0000)
lib/rainbows/event_machine/client.rb

index f3c2070..26f0dbd 100644 (file)
@@ -41,8 +41,11 @@ class Rainbows::EventMachine::Client < EM::Connection
       APP.call(@env.merge!(RACK_DEFAULTS))
     }
 
-    (nil == status || -1 == status) ? @deferred = true :
+    if (nil == status || -1 == status)
+      @deferred = true
+    else
       ev_write_response(status, headers, body, @hp.next?)
+    end
   end
 
   def deferred_errback(orig_body)