diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-29 04:21:32 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-29 04:21:32 +0000 |
| commit | 0579c42c93323a34edc28e433d7534c8a6c6285f (patch) | |
| tree | 7f32f97f6102e7054d277127a9da5cf5105dccf7 | |
| parent | 0a75637fa85da53d2050ec974243c1860ee6bcf2 (diff) | |
| download | ruby-0579c42c93323a34edc28e433d7534c8a6c6285f.tar.gz ruby-0579c42c93323a34edc28e433d7534c8a6c6285f.tar.xz ruby-0579c42c93323a34edc28e433d7534c8a6c6285f.zip | |
* test/etc/test_etc.rb (test_getpwuid): fix for users whose uid is
shared.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | test/etc/test_etc.rb | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Tue Jul 29 13:17:03 2008 NARUSE, Yui <naruse@ruby-lang.org> + + * test/etc/test_etc.rb (test_getpwuid): fix for users whose uid is + shared. + Tue Jul 29 05:37:53 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (rb_find_file_ext, rb_find_file): converts Windows style path diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb index 48a17ff4b..29e5f0bed 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 |
