ruby-changes:1671
From: ko1@a...
Date: 22 Aug 2007 09:55:11 +0900
Subject: [ruby-changes:1671] shyouhei - Ruby:r13162 (ruby_1_8_6): * random.c: documentation fix. srand(0) initializes PRNG with '0',
shyouhei 2007-08-22 09:54:43 +0900 (Wed, 22 Aug 2007) New Revision: 13162 Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/random.c branches/ruby_1_8_6/version.h Log: * random.c: documentation fix. srand(0) initializes PRNG with '0', not with random_seed. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=13162&r2=13161 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=13162&r2=13161 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/random.c?r1=13162&r2=13161 Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 13161) +++ ruby_1_8_6/ChangeLog (revision 13162) @@ -1,3 +1,8 @@ +Wed Aug 22 09:54:28 2007 NAKAMURA, Hiroshi <nahi@r...> + + * random.c: documentation fix. srand(0) initializes PRNG with '0', + not with random_seed. + Wed Aug 22 09:53:14 2007 Nobuyoshi Nakada <nobu@r...> * bcc32/{Makefile.sub,setup.mak}: remove surplus slash from srcdir. Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 13161) +++ ruby_1_8_6/version.h (revision 13162) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2007-08-22" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20070822 -#define RUBY_PATCHLEVEL 55 +#define RUBY_PATCHLEVEL 56 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_6/random.c =================================================================== --- ruby_1_8_6/random.c (revision 13161) +++ ruby_1_8_6/random.c (revision 13162) @@ -310,8 +310,8 @@ * 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 @@ default: vmax = rb_Integer(vmax); if (TYPE(vmax) == T_BIGNUM) goto bignum; + /* fall through */ case T_FIXNUM: max = FIX2LONG(vmax); break; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml