@@ -116,7 +116,7 @@ def socket_class
116116 def collect_output
117117 puts "Collecting output..."
118118 # read from @pool until all sockets are closed
119- @buffers = Hash . new { |h , k | h [ k ] = '' }
119+ @buffers = Hash . new { |h , k | h [ k ] = '' }
120120 until @pool . empty?
121121 rd , = select ( @pool )
122122 next if rd . nil?
@@ -184,9 +184,9 @@ def analyze_output
184184 end
185185 end
186186 @report = { }
187- @report [ :total_calls ] = call_times . inject ( 0.0 ) { |a , t | a += t }
187+ @report [ :total_calls ] = call_times . inject ( 0.0 ) { |a , t | a += t }
188188 @report [ :avg_calls ] = @report [ :total_calls ] / call_times . size
189- @report [ :total_clients ] = client_times . inject ( 0.0 ) { |a , t | a += t }
189+ @report [ :total_clients ] = client_times . inject ( 0.0 ) { |a , t | a += t }
190190 @report [ :avg_clients ] = @report [ :total_clients ] / client_times . size
191191 @report [ :connection_failures ] = connection_failures . size
192192 @report [ :connection_errors ] = connection_errors . size
@@ -241,8 +241,8 @@ def report_output
241241
242242 def tabulate ( fmt , *labels_and_values )
243243 labels = labels_and_values . map { |l | Array === l ? l . first : l }
244- label_width = labels . inject ( 0 ) { |w , l | l . size > w ? l . size : w }
245- labels_and_values . each do |( l , v ) |
244+ label_width = labels . inject ( 0 ) { |w , l | l . size > w ? l . size : w }
245+ labels_and_values . each do |( l , v ) |
246246 f = fmt
247247 l , f , c = l if Array === l
248248 fmtstr = "%-#{ label_width +1 } s #{ f } "
@@ -255,7 +255,7 @@ def tabulate(fmt, *labels_and_values)
255255end
256256
257257def resolve_const ( const )
258- const and const . split ( '::' ) . inject ( Object ) { |k , c | k . const_get ( c ) }
258+ const and const . split ( '::' ) . inject ( Object ) { |k , c | k . const_get ( c ) }
259259end
260260
261261puts "Starting server..."
0 commit comments