aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-01 01:01:32 -0700
committerYves Senn <yves.senn@gmail.com>2013-11-01 01:01:32 -0700
commit1adcebdb582f1cd091c5472d864e7c97b99333d0 (patch)
tree1a2afc20f2a057076b1f06eee9dffb1d21da8cb5 /activesupport/lib/active_support/core_ext
parentaaedb1a2e823b2b5958f1d15d0e4441172028df9 (diff)
parent3f79d8423078f0671c8aa505ae199608d451663d (diff)
downloadrails-1adcebdb582f1cd091c5472d864e7c97b99333d0.tar.gz
rails-1adcebdb582f1cd091c5472d864e7c97b99333d0.tar.bz2
rails-1adcebdb582f1cd091c5472d864e7c97b99333d0.zip
Merge pull request #12713 from utenmiki/document
Add Rdoc document for Array#forty_two [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-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