aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--process.c2
-rw-r--r--test/ruby/test_process.rb12
3 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cb7a92e160..005b8aed26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
diff --git a/process.c b/process.c
index 3109b9f94b..05ee2b2dfe 100644
--- a/process.c
+++ b/process.c
@@ -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));
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 84e5f13bb1..29f7ec8f1d 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -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)