Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Random.new_seed

Random.new_seed → integer

Returns an arbitrary seed value. This is used by Random.new when no seed value is specified as an argument.

Example
Random.new_seed  #=> 115032730400174366788466674494640623225
See also .new .rand .bytes .seed also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0