[ruby-cvs:56994] odaira:r49844 (trunk): * random.c (random_raw_seed): Avoid calling fill_random_bytes()

odaira at ruby-lang.org odaira at ruby-lang.org
Thu Mar 5 08:45:00 JST 2015


odaira	2015-03-05 08:44:59 +0900 (Thu, 05 Mar 2015)

  New Revision: 49844

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49844

  Log:
    * random.c (random_raw_seed): Avoid calling fill_random_bytes()
    if the requested size is 0. AIX returns -1 for 0-byte read from
    /dev/urandom, while other UNIX returns 0. With this change,
    Random.raw_seed(0) consistently retuns "" in any UNIX.

  Modified files:
    trunk/ChangeLog
    trunk/random.c


More information about the ruby-cvs mailing list