From: Bill Kelly Date: 2003-02-13T10:32:32+09:00 Subject: Re: .sig - was Re: Windows support From: "Hal E. Fulton" > > > str = "aa tut Rnrehoec Jykusbrh"; srand 0 > > > 0.upto(999) {|i| x = rand(23); str[x,2] = str[x,2].reverse! }; puts str > > > > LOL... :) Were you joking, Hal? Or is my 1.6.6 mswin32 possibly > > using a different algorothm for rand than your version? I couldn't > > understand the result... :( > > That's very interesting. > > You didn't omit the srand, did you? > > For me, it prints "Just another Ruby hacker" -- > and the srand is supposed to make the randomizing > deterministic or predictable. > > Maybe that's only true within versions and/or > platforms. I definitely included the srand.... Haven't checked the Ruby src; but maybe it calls a platform-specifc rand? Regards, Bill P.S. what it yields on 1.6.6/mswin32 for me is, "aeoneR t rurhachJtykubs" :)