зеркало из https://github.com/github/ruby.git
* 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:
Родитель
74b985aced
Коммит
8bce84fe5d
|
@ -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>
|
Mon Dec 5 18:56:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* bignum.c (big_rshift), compile.c (validate_label,
|
* bignum.c (big_rshift), compile.c (validate_label,
|
||||||
|
|
|
@ -5097,7 +5097,7 @@ proc_seteuid(rb_uid_t uid)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
proc_seteuid_m(VALUE euid)
|
proc_seteuid_m(VALUE mod, VALUE euid)
|
||||||
{
|
{
|
||||||
check_uid_switch();
|
check_uid_switch();
|
||||||
proc_seteuid(NUM2UIDT(euid));
|
proc_seteuid(NUM2UIDT(euid));
|
||||||
|
|
|
@ -1162,9 +1162,21 @@ class TestProcess < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_geteuid
|
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)
|
assert_kind_of(Integer, Process.egid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_setegid
|
||||||
|
assert_nothing_raised(TypeError) {Process.egid += 0}
|
||||||
|
end
|
||||||
|
|
||||||
def test_uid_re_exchangeable_p
|
def test_uid_re_exchangeable_p
|
||||||
r = Process::UID.re_exchangeable?
|
r = Process::UID.re_exchangeable?
|
||||||
assert(true == r || false == r)
|
assert(true == r || false == r)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче