aboutsummaryrefslogtreecommitdiffstats
path: root/test/etc/test_etc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/etc/test_etc.rb')
-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 f93c5a0e11..365c27021c 100644
--- a/test/etc/test_etc.rb
+++ b/test/etc/test_etc.rb
@@ -97,12 +97,12 @@ class TestEtc < Test::Unit::TestCase
end
def test_getgrnam
- groups = {}
+ groups = Hash.new {[]}
Etc.group do |s|
- groups[s.name] ||= s.gid unless /\A\+/ =~ s.name
+ groups[s.name] |= [s.gid] unless /\A\+/ =~ s.name
end
groups.each_pair do |n, s|
- assert_equal(s, Etc.getgrnam(n).gid)
+ assert_include(s, Etc.getgrnam(n).gid)
end
end