Please sign in to comment.
Change on Array extension from rand => random_element [#4555 state:co…
…mmitted] Signed-off-by: Xavier Noria <firstname.lastname@example.org>
- Loading branch information...
Showing with 27 additions and 13 deletions.
|@@ -1,6 +1,16 @@|
|+ # This method is deprecated because it masks Kernel#rand within the Array class itself,|
|+ # which may be used by a 3rd party library extending Array in turn. See|
|+ # https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4555|
|+ def rand # :nodoc:|
|+ ActiveSupport::Deprecation.warn "Array#rand is deprecated, use random_element instead", caller|
|# Returns a random element from the array.|
|- def rand|
|+ def random_element|