From: Emeka Patrick Date: 2012-06-29T01:06:03+09:00 Subject: Re: Is this the correct use of rand? Thanks for the help everyone! Going to use the range version as I'm using Ruby 1.9.3, but it's great to understand exactly how rand works. One more somewhat off topic question... Just finished a Ruby class and currently reviewing, and trying to improve my comfort with and knowledge of the language. Thinking about starting a Ruby on Rails class in the next week or so, but not sure if I should wait until I have a better grasp of Ruby or just forge ahead. Any thoughts or suggestions? Also, planning on going through all the Ruby Monk, learn Ruby the Hard Way, and Ruby Koans. Any other suggested resources, or suggestions for the order in which to go through the resources I listed. FYI, I also have a copy of Chris Pine's book. Thanks, Emeka Robert Klemme wrote in post #1066503: > On Thu, Jun 28, 2012 at 11:05 AM, Robert Klemme > wrote: > >> I am surprised nobody mentioned that code is flawed because it does >> not adherer to the mentioned contract: the code will yield random >> numbers outside the range given by min and max. > > Sorry Tanaka Akira, you mentioned it - and I overlooked it. :-) > > Kind regards > > robert -- Posted via http://www.ruby-forum.com/.