diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-18 06:41:58 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-18 07:44:55 +0000 |
commit | ed9f3e90939cfa9efcc6e5e9382f1e1f40c49834 (patch) | |
tree | 32cda6265c16975daebe3c1f0c1430c622e2f608 /lib/rainbows.rb | |
parent | 0e4014888f4f7f17d45c96677d672a538c6e6d94 (diff) | |
download | rainbows-ed9f3e90939cfa9efcc6e5e9382f1e1f40c49834.tar.gz |
Array#[] lookups are slightly faster under both rbx and 1.9, and easier to read.
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r-- | lib/rainbows.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 5aae746..dd7cf1b 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -85,7 +85,7 @@ module Rainbows # to by the (non-frozen) Unicorn::HttpRequest::LOCALHOST constant. def addr(io) io.respond_to?(:peeraddr) ? - io.peeraddr.last : Unicorn::HttpRequest::LOCALHOST + io.peeraddr[-1] : Unicorn::HttpRequest::LOCALHOST end # the default max body size is 1 megabyte (1024 * 1024 bytes) |