aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array/access.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-11-21 09:06:46 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-11-21 10:00:22 +0100
commite50530ca3ab5db53ebc74314c54b62b91b932389 (patch)
tree9c7c2425229d7f3130e94f52ff36f57f7f79c185 /activesupport/lib/active_support/core_ext/array/access.rb
parent1d4554d766dbf8391689d91b4b88766757051c68 (diff)
downloadrails-e50530ca3ab5db53ebc74314c54b62b91b932389.tar.gz
rails-e50530ca3ab5db53ebc74314c54b62b91b932389.tar.bz2
rails-e50530ca3ab5db53ebc74314c54b62b91b932389.zip
Reduced the number of literal aliases to the range that has actually seen personal use. With the massive savings in overhead, I was able to fit 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.rb26
1 files changed, 3 insertions, 23 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb
index a3b2a54c7d..6de338bfcc 100644
--- a/activesupport/lib/active_support/core_ext/array/access.rb
+++ b/activesupport/lib/active_support/core_ext/array/access.rb
@@ -43,29 +43,9 @@ module ActiveSupport #:nodoc:
self[4]
end
- # Equal to <tt>self[5]</tt>.
- def sixth
- self[5]
- end
-
- # Equal to <tt>self[6]</tt>.
- def seventh
- self[6]
- end
-
- # Equal to <tt>self[7]</tt>.
- def eighth
- self[7]
- end
-
- # Equal to <tt>self[8]</tt>.
- def ninth
- self[8]
- end
-
- # Equal to <tt>self[9]</tt>.
- def tenth
- self[9]
+ # Equal to <tt>self[41]</tt>. Also known as accessing "the reddit".
+ def forty_two
+ self[41]
end
end
end