rubyspec/rubyspec — pull request #301 by daveheitzman (2014-11-28 17:41:28+00:00)
Title: A couple of tests for Random when range is used as a parameter

It will be impossible to duplicate the behavior of MRI with regard to Random#rand when a range is included as a parameter. At this point, opal doesn't distinguish between (1..2) and (1.0..2) , so both will result in an integer returned from the range [1..2]

This means that #rand cannot return a float in the second case, which it does in MRI

Also created a test for the case #rand( 2..1) where MRI returns nil.