Bug #1780

Clarification of Array#sample documentation

Added by Florian Frank about 6 years ago. Updated over 4 years ago.

ruby -v:ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux] Backport:


I tried to add a description of the sample algorithm when called with an argument n > 1 to make clear that the chosen elements are sampled by using unique random indices not (possibly) repeating random indices.

ruby-array-sample-docu.patch Magnifier (824 Bytes) Florian Frank, 07/15/2009 11:33 PM


#1 Updated by Yukihiro Matsumoto about 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r24141.

Also available in: Atom PDF