Actions
Backport #929
closedArray#shuffle does not initialize random seed
Status:
Closed
Assignee:
Description
=begin
Unlike calling Kernel#rand, Array#shuffle and Array#shuffle! do not automatically seed the random number generator. This means subsequent runs of the same program will produce the same shuffles unless a separate call is made to Kernel#rand or Kernel#srand.
For example, running just
ruby -e 'p Array.new(50) {|n| n }.shuffle'
will always give the same output.
=end
Updated by nobu (Nobuyoshi Nakada) almost 16 years ago
- Status changed from Open to Closed
=begin
It has been already fixed at r18509.
=end
Updated by nobu (Nobuyoshi Nakada) almost 16 years ago
- Status changed from Closed to Assigned
- Assignee set to knu (Akinori MUSHA)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) almost 16 years ago
- Assignee changed from knu (Akinori MUSHA) to shyouhei (Shyouhei Urabe)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) almost 16 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r21617.
=end
Actions
Like0
Like0Like0Like0Like0