Mega Code Archive

 
Categories / Ruby / Development
 

Start the seed with the number 1

srand 1 rand(1000)                         # => 37 rand(1000)                         # => 235 rand(1000)                         # => 908 # Reset the seed to its previous state srand 1 rand(1000)                         # => 37 rand(1000)                         # => 235 rand(1000)                         # => 908