Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Random.new_seed

() -> ::Integer
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.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0