ruby-changes:49091
From: nobu <ko1@a...>
Date: Wed, 13 Dec 2017 19:40:59 +0900 (JST)
Subject: [ruby-changes:49091] nobu:r61206 (trunk): test_process.rb: fix error when empty groups
nobu 2017-12-13 19:40:54 +0900 (Wed, 13 Dec 2017) New Revision: 61206 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61206 Log: test_process.rb: fix error when empty groups * test/ruby/test_process.rb (test_maxgroups): set one element at least get rid of ZeroDivisionError when no process groups. [ruby-core:84224] [Bug #14174] Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 61205) +++ test/ruby/test_process.rb (revision 61206) @@ -1518,6 +1518,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1518 assert_kind_of(Integer, max) gs = Process.groups assert_operator(gs.size, :<=, max) + gs[0] ||= 0 assert_raise(ArgumentError) {Process.groups = gs * (max / gs.size + 1)} end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/