codebar / tutorials

🗒 codebar's tutorials
http://tutorials.codebar.io/
257 stars 241 forks source link

fix Random#rand lower boundary explanation #396

Closed koddsson closed 6 years ago

koddsson commented 6 years ago

I was working on this with a student today (first time at codebar :tada:) and we stumbled on this together when the #rand method returned 0 to our surprise. ruby-doc.org says:

When max is an Integer, rand returns a random integer greater than or equal to zero and less than max.

This PR adds the words "or equal to" the Random#rand explanation.