backend: fix variable shadow warning
authorEric Wong <normalperson@yhbt.net>
Thu, 21 Feb 2013 20:10:43 +0000 (21 20:10 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 21 Feb 2013 20:10:43 +0000 (21 20:10 +0000)
This bug was only introduced in
commit 3c73f6b434a4c226c09e31c6ba3b034cb314b3fb

lib/mogilefs/backend.rb

index b9fc886..48f3a2e 100644 (file)
@@ -144,7 +144,7 @@ class MogileFS::Backend
       io.timed_write(request, timeout)
       io
     rescue SystemCallError, MogileFS::RequestTruncatedError => err
-      tries ||= Hash.new { |tries,host| tries[host] = 0 }
+      tries ||= Hash.new { |hash,host| hash[host] = 0 }
       nr = tries[@active_host] += 1
       if nr >= 2
         @dead[@active_host] = [ Time.now, err ]