Gennady wrote:
>>   str = "aa tut Rnrehoec Jykusbrh"; srand 0; 0.upto(999) {|i|
>>   x = rand(23); str[x,2] = str[x,2].reverse! }; puts str
>>
>> Hal
>>
> Hmm, I wonder why it does not work in Ruby 1.6.8, it prints
> 
> R etJrbrhnotc uhaaku esy
> 
> Is it because rand() differs so much in 1.8?

Yes, there was a change in the PRNG.

We discovered that when I first posted this -- you can search the
archives for "Rnrehoec".  :)


Hal