1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (proc_seteuid_m): fix argument.

* test/ruby/test_process.rb (test_geteuid): fix typo.
* test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-12-05 10:02:02 +00:00
parent 74b985aced
commit 8bce84fe5d
3 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,11 @@
Mon Dec 5 19:01:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (proc_seteuid_m): fix argument.
* test/ruby/test_process.rb (test_geteuid): fix typo.
* test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.
Mon Dec 5 18:56:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (big_rshift), compile.c (validate_label,

View file

@ -5097,7 +5097,7 @@ proc_seteuid(rb_uid_t uid)
*/
static VALUE
proc_seteuid_m(VALUE euid)
proc_seteuid_m(VALUE mod, VALUE euid)
{
check_uid_switch();
proc_seteuid(NUM2UIDT(euid));

View file

@ -1162,9 +1162,21 @@ class TestProcess < Test::Unit::TestCase
end
def test_geteuid
assert_kind_of(Integer, Process.euid)
end
def test_seteuid
assert_nothing_raised(TypeError) {Process.euid += 0}
end
def test_getegid
assert_kind_of(Integer, Process.egid)
end
def test_setegid
assert_nothing_raised(TypeError) {Process.egid += 0}
end
def test_uid_re_exchangeable_p
r = Process::UID.re_exchangeable?
assert(true == r || false == r)