diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-30 08:32:26 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-04 16:21:17 -0800 |
commit | c38bc88363d4c4f5f639540ca86f4dd1225df79e (patch) | |
tree | 97d039d48177dc571d81a224437dffc7d44045de /lib/rainbows/fiber | |
parent | 1a03f9a525faf4c997546c419de6854223b645c4 (diff) | |
download | rainbows-c38bc88363d4c4f5f639540ca86f4dd1225df79e.tar.gz |
Unique method names makes it easier to follow code and determine where our methods come from.
Diffstat (limited to 'lib/rainbows/fiber')
-rw-r--r-- | lib/rainbows/fiber/body.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/fiber/body.rb b/lib/rainbows/fiber/body.rb index 29926c6..1d7d325 100644 --- a/lib/rainbows/fiber/body.rb +++ b/lib/rainbows/fiber/body.rb @@ -12,7 +12,7 @@ module Rainbows::Fiber::Body # :nodoc: # the sendfile 1.0.0+ gem includes IO#sendfile_nonblock if IO.method_defined?(:sendfile_nonblock) - def write_body_file(client, body, range) + def write_body_file_sendfile_fiber(client, body, range) sock, n, body = client.to_io, nil, body_to_io(body) offset, count = range ? range : [ 0, body.stat.size ] begin @@ -26,6 +26,7 @@ module Rainbows::Fiber::Body # :nodoc: ensure close_if_private(body) end + ALIASES[:write_body_file] = :write_body_file_sendfile_fiber else ALIASES[:write_body] = :write_body_each end |