summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 19:52:39 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 19:52:39 +0000
commit901e94812a74d327c0c0ddbd12aef4b020b42f0c (patch)
tree3c1d97ef78a7575df897d7f148f28a3ca75871cd
parenta9df60d4109065cfaf06b4c751cb7d7a9598ff3e (diff)
* 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_5@12976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--random.c5
-rw-r--r--version.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 253cf05f7b..5f5a850a2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 16 04:52:11 2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * random.c: documentation fix. srand(0) initializes PRNG with '0',
+ not with random_seed.
+
Thu Aug 16 04:49:10 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bcc32/{Makefile.sub,setup.mak}: remove surplus slash from srcdir.
diff --git a/random.c b/random.c
index df4bcbaba7..8de3419562 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;
diff --git a/version.h b/version.h
index cb197349cd..f701d93e46 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-16"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070816
-#define RUBY_PATCHLEVEL 66
+#define RUBY_PATCHLEVEL 67
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8