Re: Ruby BuiltIn functions srand
srand( [ aNumber ] ) -> oldSeed
Seeds the pseudorandom number generator to the value of aNumber.to_i.abs. If aNumber is omitted or zero, seeds the generator using a combination of the time, the process id, and a sequence number. (This is also the behavior if Kernel::rand is called without previously calling srand, but without the sequence.) By setting the seed to a known value, scripts can be made deterministic during testing. The previous seed value is returned.
__________________ Shaalini.S Be the Best of Whatever you are... |