about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/mogilefs/admin.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mogilefs/admin.rb b/lib/mogilefs/admin.rb
index eeff6bd..68574ca 100644
--- a/lib/mogilefs/admin.rb
+++ b/lib/mogilefs/admin.rb
@@ -120,6 +120,7 @@ class MogileFS::Admin < MogileFS::Client
   #
   # *** This command no longer works with recent versions of MogileFS ***
   # *** Use mogstats(1) from the MogileFS::Utils package on CPAN ***
+  # *** We will remove this method in 4.x ***
   #
   #   admin.get_stats
   #
@@ -148,9 +149,9 @@ class MogileFS::Admin < MogileFS::Client
       }
     end
 
-    stats.delete 'device' if stats['device'].empty?
-    stats.delete 'file' if stats['file'].empty?
-    stats.delete 'replication' if stats['replication'].empty?
+    %w(device file replication).each do |s|
+      stats.delete(s) if stats[s].empty?
+    end
 
     stats
   end