From: "Hal E. Fulton" Date: 2003-02-13T10:40:10+09:00 Subject: Re: .sig - was Re: Windows support ----- Original Message ----- From: "Bill Kelly" To: "ruby-talk ML" Sent: Wednesday, February 12, 2003 7:32 PM 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" :) Well, I don't think it's platform-specific, as I'm also on Windows: ruby 1.7.3 (2002-11-17) [i386-mswin32] Maybe version-specific? That's a tiny bit disturbing if so... Hal