summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-19 00:35:32 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-19 00:35:32 (GMT)
commit42a9234cc48382c3ea89ea04edf1b4d6e4b7972e (patch)
tree4fb3f4da0765e9a04d8729a1b01e8eaa286e0183 /random.c
parent6878e597c4412e5b5ca2539ed74ddd2455576f50 (diff)
* random.c (random_init): Clarify that the default seed is
Random.new_seed, not zero. Based on patch by Roger Pack. [ruby-trunk - Bug #6313] * random.c (rb_f_srand): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/random.c b/random.c
index 1a93779..9dbcbd1 100644
--- a/random.c
+++ b/random.c
@@ -448,8 +448,7 @@ rand_init(struct MT *mt, VALUE vseed)
/*
* call-seq:
- * Random.new() -> prng
- * Random.new(seed) -> prng
+ * Random.new(seed = Random.new_seed) -> prng
*
* Creates a new PRNG using +seed+ to set the initial state. If +seed+ is
* omitted, the generator is initialized with Random.new_seed.
@@ -762,7 +761,7 @@ random_load(VALUE obj, VALUE dump)
/*
* call-seq:
- * srand(number=0) -> old_seed
+ * srand(number = Random.new_seed) -> old_seed
*
* Seeds the system pseudo-random number generator, Random::DEFAULT, with
* +number+. The previous seed value is returned.