aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-04-27 17:35:00 +0200
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-04-27 17:35:00 +0200
commit11537c57cbf91c0514fac1c40bdf362ba5deef33 (patch)
treed7dce9d76cd1797c9fc6f9ececc375228b26be6f /activesupport/lib
parente84788e60c179ad0cd4a13d54e7c7a50c68d748a (diff)
downloadrails-11537c57cbf91c0514fac1c40bdf362ba5deef33.tar.gz
rails-11537c57cbf91c0514fac1c40bdf362ba5deef33.tar.bz2
rails-11537c57cbf91c0514fac1c40bdf362ba5deef33.zip
fixed a small bug with Array#from core_ext
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/array/access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb
index 2bba0974b3..2df4fd1da1 100644
--- a/activesupport/lib/active_support/core_ext/array/access.rb
+++ b/activesupport/lib/active_support/core_ext/array/access.rb
@@ -6,7 +6,7 @@ class Array
# %w( a b c d ).from(10) # => %w()
# %w().from(0) # => %w()
def from(position)
- [position, length] || []
+ self[position, length] || []
end
# Returns the beginning of the array up to +position+.