From: Daniel Berger Date: 2011-03-05T08:16:38+09:00 Subject: [ruby-core:35427] [Ruby 1.8 - Bug #4467] Process.maxgroups= should only accept numeric values Issue #4467 has been updated by Daniel Berger. I'd also argue that it should raise an ArgumentError for values less than 0. ---------------------------------------- Bug #4467: Process.maxgroups= should only accept numeric values http://redmine.ruby-lang.org/issues/4467 Author: Daniel Berger Status: Open Priority: Normal Assignee: Category: core Target version: Ruby 1.8.7 ruby -v: ruby 1.8.7 (2010-08-16 patchlevel 334) [i686-linux] 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