From 6bbd76a73295564871ab06f8da167ce6de0af467 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 29 Dec 2008 13:29:12 +0000 Subject: * random.c (rb_f_rand): type check simplified. strings are no longer allowed for argument. [ruby-dev:37655] * test/ruby/test_rand.rb (TestRand::o.to_int): need override to_int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rand.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_rand.rb') diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index b7d841dbba..7f1e71de3f 100644 --- a/test/ruby/test_rand.rb +++ b/test/ruby/test_rand.rb @@ -144,7 +144,7 @@ class TestRand < Test::Unit::TestCase 0.000000000000001) srand(0) o = Object.new - def o.to_i; 100; end + def o.to_int; 100; end assert_equal(44, rand(o)) assert_equal(47, rand(o)) assert_equal(64, rand(o)) -- cgit v1.2.3