diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-29 13:29:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-29 13:29:12 +0000 |
commit | 6bbd76a73295564871ab06f8da167ce6de0af467 (patch) | |
tree | f0539bc7d34396eb61f61579dcd03257f5b01844 /test | |
parent | db86fef72f2a4b54748cd6b7aa656836c3b332af (diff) | |
download | ruby-6bbd76a73295564871ab06f8da167ce6de0af467.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rand.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |