about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-03-14 16:52:19 -0700
committerEric Wong <normalperson@yhbt.net>2011-03-14 16:52:19 -0700
commit65dc45b7a13c92b27bc3589e37a3b52c29b7fbee (patch)
treedd6c00dd731aac1a70759040010f82b4c0c004e2
parenta9bfa55f9a1d1c96d73367d3bb46f7b9e81fbbf9 (diff)
More confusing for me, actually...
-rw-r--r--lib/raindrops/linux.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/raindrops/linux.rb b/lib/raindrops/linux.rb
index 55887f0..8a67887 100644
--- a/lib/raindrops/linux.rb
+++ b/lib/raindrops/linux.rb
@@ -50,8 +50,8 @@ module Raindrops::Linux
 
     # no point in pread since we can't stat for size on this file
     File.read(*PROC_NET_UNIX_ARGS).scan(paths) do |s|
-      path = s.last
-      case s.first.to_i
+      path = s[-1]
+      case s[0].to_i
       when 2 then rv[path].queued += 1
       when 3 then rv[path].active += 1
       end