From 187ae6d5a7b4b8f98383f8833f4742ab66f27c22 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 10 Oct 2012 12:38:15 +0000 Subject: Rename variabls * uid always stores uid * user stores username or nil git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/ruby/test_process.rb') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index d65c1cc10e..b0a43a1bd5 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1481,7 +1481,7 @@ class TestProcess < Test::Unit::TestCase def test_execopts_uid feature6975 = '[ruby-core:47414]' - [30000, [ENV["USER"], Process.uid]].each do |user, uid| + [30000, [Process.uid, ENV["USER"]]].each do |uid, user| if user assert_nothing_raised(feature6975) do begin @@ -1498,11 +1498,10 @@ class TestProcess < Test::Unit::TestCase end end - uid = "#{uid || user}" assert_nothing_raised(feature6975) do begin - u = IO.popen([RUBY, "-e", "print Process.uid", uid: user], &:read) - assert_equal(uid, u, feature6975) + u = IO.popen([RUBY, "-e", "print Process.uid", uid: user||uid], &:read) + assert_equal(uid.to_s, u, feature6975) rescue Errno::EPERM, NotImplementedError end end -- cgit v1.2.3