Editing Topic: RCR62 Project: RCR | RCRchive home

RCR 62: Kernel::rand to accept Range

submitted by anonymous on 2002-02-11 08:27:03


This is a legacy RCR. If this is your RCR, please resubmit it using the new format and process.


I would like rand() to be able to take a Range as a parameter:

rand(20..30) #=> random number between 20 and 30.

rand(40...50) #=> random number between 40 and 49.



Back to RCRchive.


RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog