* random.c (Init_Random): add Random::DEFAULT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-08-03 12:16:06 +00:00
parent b80d5f14df
commit a4c0f7dfae
3 changed files with 24 additions and 1 deletions

View file

@ -415,4 +415,16 @@ END
assert_equal(r1, r2)
}
end
def test_default
r1 = Random::DEFAULT.dup
r2 = Random::DEFAULT.dup
3.times do
x0 = rand
x1 = r1.rand
x2 = r2.rand
assert_equal(x0, x1)
assert_equal(x0, x2)
end
end
end