Class: Random

Inherits:
Object show all
Extended by:
Implementation
Includes:
Implementation
Defined in:
lib/vendor/backports-3.3.5/lib/backports/extra/random/load.rb,
lib/vendor/backports-3.3.5/lib/backports/extra/random/MT19937.rb,
lib/vendor/backports-3.3.5/lib/backports/extra/random/bits_and_bytes.rb,
lib/vendor/backports-3.3.5/lib/backports/extra/random/implementation.rb

Defined Under Namespace

Modules: Implementation Classes: MT19937

Instance Attribute Summary

Attributes included from Implementation

#seed

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Implementation

==, bytes, initialize, marshal_dump, marshal_load, rand, srand

Class Method Details

.new_seedObject



89
90
91
92
# File 'lib/vendor/backports-3.3.5/lib/backports/extra/random/implementation.rb', line 89

def self.new_seed
  Kernel::srand # use the built-in seed generator
  Kernel::srand # return the generated seed
end

Instance Method Details

#inspectObject



12
13
14
# File 'lib/vendor/backports-3.3.5/lib/backports/extra/random/load.rb', line 12

def inspect
  "#<#{self.class.name}:#{object_id}>"
end