On Tuesday, January 21, 2003, at 03:15 AM, Park Heesob wrote:

>
> Hi,
>
> "Phil Tomson" <ptkwt / shell1.aracnet.com> wrote in message
news:b0ivi80pgg / enews3.newsguy.com...
In article <b0idhk0gj3 / enews4.newsguy.com>,
>
> A couple of questions:
> 1) how good is Ruby's rand function (what's the quality of randomness)?
I
> suspec that it is just the same as C's rand, so there won't be a
> difference.
> 2) I'd like to plug in my own random number generator that would 
> probably
> produce higher-quality random numbers than the current rand does.  I'm
> pretty sure it should be doable and easy, like:
>
> module Kernel
>  def rand(max=0)
>    #do random number generation magic here
>  end
> end

So long as we're redefining rand, and srand, can I recommend that they 
be put into a Random object?  It is occasionally very helpful to have 
separate random number domains.  Especially when you're trying to abuse 
a PRNG.