diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array/random_access.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/random_access.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/random_access.rb b/activesupport/lib/active_support/core_ext/array/random_access.rb index 54d17cbf30..343003f6f7 100644 --- a/activesupport/lib/active_support/core_ext/array/random_access.rb +++ b/activesupport/lib/active_support/core_ext/array/random_access.rb @@ -1,12 +1,6 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - module RandomAccess - # Returns a random element from the array. - def rand - self[Kernel.rand(length)] - end - end - end +class Array + # Returns a random element from the array. + def rand + self[Kernel.rand(length)] end end |