rand.rb is a library for picking random elements and shuffling.
rand.rb adds new methods to Enumerable, Array, and Hash to:
return a random element (
pick_valueand their destructive versions suffixed with
arrange elements in new, random order (
use above methods in convenient ways (
It also provides these new facilities to String:
shuffle_chars, to arrange the characters of the string in new order.
pick_index, to return random bytes, characters or elements.
November 26, 2004: Initial version done as IRC collaboration project between kig and chris2.
November 29, 2004: First release 0.9.
December 15, 2004: 0.9 officially announced.
You can download rand.rb at
You can get latest development releases using darcs by executing:
darcs get http://chneukirchen.org/repos/rand
darcs send is the preferred way to send patches, but mailing diffs
is fine too.
Please mail bugs, feature requests or patches to the mail addresses above or use IRC to contact the developers.
Copyright © 2004 Ilmari Heikkinen
Parts Copyright © 2004 Christian Neukirchen
This work is licensed under the same terms as Ruby itself.