You are quite right, and this should not happen. The key is that the generator has not been seeded yet. If you seed it with some number, e.g. r.seed(42); then it behaves as expected.
What I have done is to update the code so that it is seeded with the current timestamp by default now. This means that the numbers won't be deterministic unless you supply a seed yourself, but they will now be random (instead of 5, 5, 5, 5, 5,....).
<http://jsgamesoup.net/tests/random-simple.html> (you'll need javascript console to see this one working)
<http://jsgamesoup.net/jsdocs/symbols/SeedableRandom.html>
Thanks for finding this bug!
Cheers,
Chris.
-------------------
http://mccormick.cx