summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-11 14:44:22 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-11 14:44:22 +0000
commitd7e32900ccde0a07e9912f04595e85795114dde8 (patch)
tree5414a6809ad944ec9181512562fdb0418beae019 /random.c
parent1141ad02170a40c3cdb09b3db6fc142ef87f5249 (diff)
# the previous commit should include random.c
* random.c: documentation fix. srand(0) initializes PRNG with '0', not with random_seed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/random.c b/random.c
index 6fa4f2ec02..eb9803af07 100644
--- a/random.c
+++ b/random.c
@@ -310,8 +310,8 @@ random_seed()
* srand(number=0) => old_seed
*
* Seeds the pseudorandom number generator to the value of
- * <i>number</i>.<code>to_i.abs</code>. If <i>number</i> is omitted
- * or zero, seeds the generator using a combination of the time, the
+ * <i>number</i>.<code>to_i.abs</code>. If <i>number</i> is omitted,
+ * seeds the generator using a combination of the time, the
* process id, and a sequence number. (This is also the behavior if
* <code>Kernel::rand</code> is called without previously calling
* <code>srand</code>, but without the sequence.) By setting the seed
@@ -481,6 +481,7 @@ rb_f_rand(argc, argv, obj)
default:
vmax = rb_Integer(vmax);
if (TYPE(vmax) == T_BIGNUM) goto bignum;
+ /* fall through */
case T_FIXNUM:
max = FIX2LONG(vmax);
break;