Issue #4467 has been updated by Daniel Berger.


I agree, Process.maxgroups= should be deprecated unless there's an underlying posix call that supports it. I don't think there is one, and I agree that there doesn't seem to be a use case for it.
----------------------------------------
Bug #4467: Process.maxgroups= should only accept numeric values
http://redmine.ruby-lang.org/issues/4467

Author: Daniel Berger
Status: Closed
Priority: Normal
Assignee: 
Category: core
Target version: Ruby 1.8.7
ruby -v: -


At the moment Process.maxgroups= accepts non-numeric values, which results in defaulting to 4096. IMO it should raise a TypeError.

diff --git a/process.orig b/process.c
index f658fa9..c3c4a1f 100644
--- a/process.orig
+++ b/process.c
@@ -2752,7 +2752,7 @@ proc_getmaxgroups(obj)
 static VALUE
 proc_setmaxgroups(VALUE obj, VALUE val)
 {
-    size_t  ngroups = FIX2INT(val);
+    size_t  ngroups = NUM2INT(val);
 
     if (ngroups > 4096)
        ngroups = 4096;


-- 
http://redmine.ruby-lang.org