Project

General

Profile

Actions

Bug #6313

closed

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

Added by rogerdpack (Roger Pack) about 12 years ago. Updated about 12 years ago.

Status:
Closed
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
Actions #1

Updated by drbrain (Eric Hodel) about 12 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) about 12 years ago

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

Actions

Also available in: Atom PDF

Like0
Like0Like0