From: Marc-Andre Lafortune Date: 2009-08-05T06:28:27+09:00 Subject: [ruby-core:24765] [Bug #1858] Random#int's Handling of Invalid Arguments Contradicts its Documentation Issue #1858 has been updated by Marc-Andre Lafortune. The contradiction should be addressed, but it's important that Random.new.int(1) returns 0 for completeness' sake. For example, if someone has a good reason to use a specific random generator to pick an element in an array: randgen = Random.new #... myarray[randgen.int(myarray.size)] This should work even if the array contains only 1 element. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1858 ---------------------------------------- http://redmine.ruby-lang.org