projects
/
depot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Froze rails gems
[depot.git]
/
vendor
/
rails
/
activesupport
/
lib
/
active_support
/
core_ext
/
array
/
random_access.rb
diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
b/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
new file mode 100644
(file)
index 0000000..
54d17cb
--- /dev/null
+++ b/
vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
@@ -0,0
+1,12
@@
+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