Project

General

Profile

Bug #6313

[rdoc] clarify that srand(number) is not default 0

Added by rogerdpack (Roger Pack) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
22263729af
Backport:
[ruby-core:44428]

Description

Since srand(0) is not the default, attempt to clarify that.


Files

clarify_default_not_zero.diff (457 Bytes) clarify_default_not_zero.diff rogerdpack (Roger Pack), 04/18/2012 02:16 AM
#1

Updated by drbrain (Eric Hodel) over 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35393.
Roger, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • 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.

Updated by drbrain (Eric Hodel) over 8 years ago

Both Random.new and srand call Random.new_seed so I updated the documentation of each based on your patch.

Also available in: Atom PDF