diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-27 17:35:00 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-27 17:35:00 +0200 |
commit | 11537c57cbf91c0514fac1c40bdf362ba5deef33 (patch) | |
tree | d7dce9d76cd1797c9fc6f9ececc375228b26be6f /activesupport | |
parent | e84788e60c179ad0cd4a13d54e7c7a50c68d748a (diff) | |
download | rails-11537c57cbf91c0514fac1c40bdf362ba5deef33.tar.gz rails-11537c57cbf91c0514fac1c40bdf362ba5deef33.tar.bz2 rails-11537c57cbf91c0514fac1c40bdf362ba5deef33.zip |
fixed a small bug with Array#from core_ext
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/access.rb | 2 |
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+. |