mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (proc_setgroups): cleanup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1f9ee467c8
commit
776156243c
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Mar 8 23:49:45 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* process.c (proc_setgroups): cleanup.
|
||||||
|
|
||||||
Tue Mar 8 23:40:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Mar 8 23:40:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* test/misc/test_ruby_mode.rb: test for ruby-mode.el.
|
* test/misc/test_ruby_mode.rb: test for ruby-mode.el.
|
||||||
|
|
|
@ -4639,10 +4639,10 @@ proc_setgroups(VALUE obj, VALUE ary)
|
||||||
|
|
||||||
Check_Type(ary, T_ARRAY);
|
Check_Type(ary, T_ARRAY);
|
||||||
|
|
||||||
if (RARRAY_LEN(ary) > maxgroups())
|
ngroups = RARRAY_LENINT(ary);
|
||||||
|
if (ngroups > maxgroups())
|
||||||
rb_raise(rb_eArgError, "too many groups, %d max", maxgroups());
|
rb_raise(rb_eArgError, "too many groups, %d max", maxgroups());
|
||||||
|
|
||||||
ngroups = RARRAY_LENINT(ary);
|
|
||||||
groups = ALLOCA_N(rb_gid_t, ngroups);
|
groups = ALLOCA_N(rb_gid_t, ngroups);
|
||||||
|
|
||||||
for (i = 0; i < ngroups; i++) {
|
for (i = 0; i < ngroups; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue