From 712ef17547291fed37e79d37d0b6e0128ed43e0d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 Dec 2010 23:41:51 +0000 Subject: [PATCH] remove unnecessary "::" constant prefixing It's ugly to look at. --- lib/rainbows/fiber/body.rb | 2 +- lib/rainbows/rev/client.rb | 4 ++-- lib/rainbows/rev/core.rb | 2 +- lib/rainbows/rev/server.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rainbows/fiber/body.rb b/lib/rainbows/fiber/body.rb index f3299dc..0fe2ec6 100644 --- a/lib/rainbows/fiber/body.rb +++ b/lib/rainbows/fiber/body.rb @@ -11,7 +11,7 @@ module Rainbows::Fiber::Body # :nodoc: } # the sendfile 1.0.0+ gem includes IO#sendfile_nonblock - if ::IO.method_defined?(:sendfile_nonblock) + if IO.method_defined?(:sendfile_nonblock) def write_body_file(client, body, range) sock, n = client.to_io, nil offset, count = range ? range : [ 0, body.stat.size ] diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb index f35ef68..00df4d3 100644 --- a/lib/rainbows/rev/client.rb +++ b/lib/rainbows/rev/client.rb @@ -1,6 +1,6 @@ # -*- encoding: binary -*- # :enddoc: -class Rainbows::Rev::Client < ::Rev::IO +class Rainbows::Rev::Client < Rev::IO include Rainbows::EvCore G = Rainbows::G SF = Rainbows::StreamFile @@ -25,7 +25,7 @@ class Rainbows::Rev::Client < ::Rev::IO close if @deferred.nil? && @_write_buffer.empty? end - # override the ::Rev::IO#write method try to write directly to the + # override the Rev::IO#write method try to write directly to the # kernel socket buffers to avoid an extra userspace copy if # possible. def write(buf) diff --git a/lib/rainbows/rev/core.rb b/lib/rainbows/rev/core.rb index 5dc4ebe..8b3ffa8 100644 --- a/lib/rainbows/rev/core.rb +++ b/lib/rainbows/rev/core.rb @@ -12,7 +12,7 @@ module Rainbows::Rev::Core Rainbows::Rev::Client.__send__(:include, Rainbows::Rev::Sendfile) init_worker_process(worker) mod = Rainbows.const_get(@use) - rloop = Rainbows::Rev::Server.const_set(:LOOP, ::Rev::Loop.default) + rloop = Rainbows::Rev::Server.const_set(:LOOP, Rev::Loop.default) Rainbows::Rev::Client.const_set(:LOOP, rloop) Rainbows::Rev::Server.const_set(:MAX, @worker_connections) Rainbows::Rev::Server.const_set(:CL, mod.const_get(:Client)) diff --git a/lib/rainbows/rev/server.rb b/lib/rainbows/rev/server.rb index 7363b5c..b75e593 100644 --- a/lib/rainbows/rev/server.rb +++ b/lib/rainbows/rev/server.rb @@ -1,6 +1,6 @@ # -*- encoding: binary -*- # :enddoc: -class Rainbows::Rev::Server < ::Rev::IO +class Rainbows::Rev::Server < Rev::IO CONN = Rainbows::Rev::CONN # CL and MAX will be defined in the corresponding worker loop -- 2.11.4.GIT