aboutsummaryrefslogtreecommitdiffstats
path: root/test/etc
diff options
context:
space:
mode:
Diffstat (limited to 'test/etc')
-rw-r--r--test/etc/test_etc.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb
index 48a17ff4bf..29e5f0bed2 100644
--- a/test/etc/test_etc.rb
+++ b/test/etc/test_etc.rb
@@ -28,9 +28,9 @@ class TestEtc < Test::Unit::TestCase
end
def test_getpwuid
- passwd = []
- Etc.passwd {|s| passwd << s }
- passwd.each do |s|
+ passwd = {}
+ Etc.passwd {|s| passwd[s.uid] = s unless passwd[s.uid] }
+ passwd.values.each do |s|
assert_equal(s, Etc.getpwuid(s.uid))
assert_equal(s, Etc.getpwuid) if Etc.getlogin == s.name
end