[ruby/strscan] jruby: Check if len++ walked off the end
[ruby.git] / array.rb
blob5f31693cabf2de7b2aac657a0ca9590fb5398178
1 class Array
2   # call-seq:
3   #   shuffle!(random: Random) -> self
4   #
5   # Shuffles all elements in +self+ into a random order,
6   # as selected by the object given by the keyword argument +random+.
7   # Returns +self+:
8   #
9   #   a =             [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
10   #   a.shuffle! # => [5, 3, 8, 7, 6, 1, 9, 4, 2, 0]
11   #   a.shuffle! # => [9, 4, 0, 6, 2, 8, 1, 5, 3, 7]
12   #