From: Run Paint Run Run Date: 2009-08-01T17:15:31+09:00 Subject: [ruby-core:24651] [Bug #1854] Random#float Should Reject Infinity and NaN as Upper Limits Bug #1854: Random#float Should Reject Infinity and NaN as Upper Limits http://redmine.ruby-lang.org/issues/show/1854 Author: Run Paint Run Run Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.2dev (2009-08-01 trunk 24343) [i686-linux] Random#float happily accepts Infinity and NaN as arguments. It should reject them for three reasons: * Accepting an argument of Infinity implies that the value returned will be between 0.0 and Infinity, when in fact Infinity is always returned. * If Infinity or NaN were given by mistake the method would function without error despite not even being _pseudo_ random. That is very dangerous. * NaN is meaningless as maximum value. ---------------------------------------- http://redmine.ruby-lang.org