aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-04-27 08:42:32 -0700
committerJoshua Peek <josh@joshpeek.com>2011-04-27 08:42:32 -0700
commitc992045da3d7f1767ad3dff0fd9d5b275e4e3e62 (patch)
treed7dce9d76cd1797c9fc6f9ececc375228b26be6f
parente84788e60c179ad0cd4a13d54e7c7a50c68d748a (diff)
parent11537c57cbf91c0514fac1c40bdf362ba5deef33 (diff)
downloadrails-c992045da3d7f1767ad3dff0fd9d5b275e4e3e62.tar.gz
rails-c992045da3d7f1767ad3dff0fd9d5b275e4e3e62.tar.bz2
rails-c992045da3d7f1767ad3dff0fd9d5b275e4e3e62.zip
Merged pull request #324 from joshk/fix_array_from.
fixed a small bug with Array#from core_ext
-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+.