diff --git a/core/random.rbs b/core/random.rbs index ee5a6a6d8..b7cca5f60 100644 --- a/core/random.rbs +++ b/core/random.rbs @@ -96,6 +96,23 @@ class Random < RBS::Unnamed::Random_Base | (Float | ::Range[Float] max) -> Float | [T < Numeric] (::Range[T]) -> T + # + # Returns the seed value used to initialize the Ruby system PRNG. This may be + # used to initialize another generator with the same state at a later time, + # causing it to produce the same sequence of numbers. + # + # Random.seed #=> 1234 + # prng1 = Random.new(Random.seed) + # prng1.seed #=> 1234 + # prng1.rand(100) #=> 47 + # Random.seed #=> 1234 + # Random.rand(100) #=> 47 + # + def self.seed: () -> ::Integer + #