Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* 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
  • Loading branch information...
commit 42a9234cc48382c3ea89ea04edf1b4d6e4b7972e 1 parent 6878e59
@drbrain drbrain authored
Showing with 9 additions and 3 deletions.
  1. +7 −0 ChangeLog
  2. +2 −3 random.c
View
7 ChangeLog
@@ -1,3 +1,10 @@
+Thu Apr 19 09:35:15 2012 Eric Hodel <drbrain@segment7.net>
+
+ * 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.
+
Thu Apr 19 08:59:02 2012 Eric Hodel <drbrain@segment7.net>
* ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
View
5 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.
Please sign in to comment.
Something went wrong with that request. Please try again.