Sha256: 8a93a6d6022ab9d739973fa197a971fff49ecbfb051c5d9915f51ad5d19d73b6

Contents?: true

Size: 259 Bytes

Versions: 84

Compression:

Stored size: 259 Bytes

Contents

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
  end
end

Version data entries

84 entries across 81 versions & 22 rubygems

Version Path
radiant-0.8.2 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
radiant-0.9.0.rc2 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
webroar-0.3.1 src/admin_panel/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
webroar-0.3.0 src/admin_panel/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/activesupport/pkg/activesupport-2.3.3/lib/active_support/core_ext/array/random_access.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/pkg/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
activesupport-2.3.6.pre lib/active_support/core_ext/array/random_access.rb
simply_stated-0.0.5 vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/random_access.rb
simply_stated-0.0.4 vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/random_access.rb
factorylabs-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/array/random_access.rb
ginst-2009.12.8 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
activesupport-2.3.5 lib/active_support/core_ext/array/random_access.rb
ginst-2009.11.24 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
ginst-2009.11.23 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
ginst-2.0.1 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
ginst-2.0.0 vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
gemstreamer-1.2.0 spec/assets/testapp/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
gemstreamer-1.1.1 spec/assets/testapp/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb