Project

General

Profile

Actions

Bug #455

closed

Array#sample(n) loops if a > arr.size

Added by pragdave (Dave Thomas) about 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:18337]

Description

=begin
Try:

[1].sample(2)
=end

Actions

Also available in: Atom PDF