[前][次][番号順一覧][スレッド一覧]

ruby-changes:27418

From: nobu <ko1@a...>
Date: Sun, 24 Feb 2013 16:51:34 +0900 (JST)
Subject: [ruby-changes:27418] nobu:r39470 (trunk): test_array.rb: fix test for r39466

nobu	2013-02-24 16:48:31 +0900 (Sun, 24 Feb 2013)

  New Revision: 39470

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39470

  Log:
    test_array.rb: fix test for r39466
    
    * test/ruby/test_array.rb (test_sample_random): remove adjustment for
      the bug fixed by r39466.  [ruby-core:52779] [Bug #7935]

  Modified files:
    trunk/test/ruby/test_array.rb

Index: test/ruby/test_array.rb
===================================================================
--- test/ruby/test_array.rb	(revision 39469)
+++ test/ruby/test_array.rb	(revision 39470)
@@ -2055,14 +2055,14 @@ class TestArray < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L2055
     ary = (0...10000).to_a
     assert_raise(ArgumentError) {ary.sample(1, 2, random: nil)}
     gen0 = proc do |max|
-      (max+1)/2
+      max/2
     end
     class << gen0
       alias rand call
     end
     gen1 = proc do |max|
       ary.replace([])
-      (max+1)/2
+      max/2
     end
     class << gen1
       alias rand call

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]