aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array/access.rb
diff options
context:
space:
mode:
authorutenmiki <utenmiki@gmail.com>2013-10-31 23:20:15 +0900
committerutenmiki <utenmiki@gmail.com>2013-10-31 23:20:15 +0900
commit3f79d8423078f0671c8aa505ae199608d451663d (patch)
tree8abd6790fedae74487b857fad91605340ce9189b /activesupport/lib/active_support/core_ext/array/access.rb
parentcc2a9df970763fcf4621da2314a71720e299cf0d (diff)
downloadrails-3f79d8423078f0671c8aa505ae199608d451663d.tar.gz
rails-3f79d8423078f0671c8aa505ae199608d451663d.tar.bz2
rails-3f79d8423078f0671c8aa505ae199608d451663d.zip
Add Rdoc document for Array#forty_two
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array/access.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/array/access.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb
index 4f1e432b61..67f58bc0fe 100644
--- a/activesupport/lib/active_support/core_ext/array/access.rb
+++ b/activesupport/lib/active_support/core_ext/array/access.rb
@@ -48,6 +48,8 @@ class Array
end
# Equal to <tt>self[41]</tt>. Also known as accessing "the reddit".
+ #
+ # (1..42).to_a.forty_two # => 42
def forty_two
self[41]
end