From 18318887920773d43b72e9fb6490d3e74674bcf0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Jun 2011 03:30:39 +0000 Subject: fix Ruby warnings Found in the check-warnings target in pkg.mk --- lib/raindrops/aggregate/last_data_recv.rb | 3 ++- lib/raindrops/aggregate/pmq.rb | 6 +++--- lib/raindrops/watcher.rb | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/raindrops/aggregate/last_data_recv.rb b/lib/raindrops/aggregate/last_data_recv.rb index 1e18d76..eca89a2 100644 --- a/lib/raindrops/aggregate/last_data_recv.rb +++ b/lib/raindrops/aggregate/last_data_recv.rb @@ -46,7 +46,8 @@ module Raindrops::Aggregate::LastDataRecv # for accuracy. def self.extended(obj) obj.raindrops_aggregate = default_aggregate - obj.setsockopt Socket::SOL_TCP, tcp_defer_accept = 9, seconds = 60 + # obj.setsockopt Socket::SOL_TCP, tcp_defer_accept = 9, seconds = 60 + obj.setsockopt Socket::SOL_TCP, 9, 60 end # :stopdoc: diff --git a/lib/raindrops/aggregate/pmq.rb b/lib/raindrops/aggregate/pmq.rb index 6497ce1..a2dd45e 100644 --- a/lib/raindrops/aggregate/pmq.rb +++ b/lib/raindrops/aggregate/pmq.rb @@ -229,11 +229,11 @@ class Raindrops::Aggregate::PMQ def outliers_high; aggregate.outliers_high; end # proxy for \Aggregate#to_s - def to_s(*args); aggregate.to_s *args; end + def to_s(*args); aggregate.to_s(*args); end # proxy for \Aggregate#each - def each; aggregate.each { |*args| yield *args }; end + def each; aggregate.each { |*args| yield(*args) }; end # proxy for \Aggregate#each_nonzero - def each_nonzero; aggregate.each_nonzero { |*args| yield *args }; end + def each_nonzero; aggregate.each_nonzero { |*args| yield(*args) }; end end diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb index 6ecd3ed..6d965a5 100644 --- a/lib/raindrops/watcher.rb +++ b/lib/raindrops/watcher.rb @@ -228,6 +228,7 @@ class Raindrops::Watcher end def get(env) + retried = false case env["PATH_INFO"] when "/" index @@ -247,7 +248,7 @@ class Raindrops::Watcher not_found end rescue Errno::EDOM - raise if defined?(retried) + raise if retried retried = true wait_snapshot retry -- cgit v1.2.3-24-ge0c7