Permalink
Browse files

fixed a small bug with Array#from core_ext

  • Loading branch information...
1 parent e84788e commit 11537c57cbf91c0514fac1c40bdf362ba5deef33 @joshk joshk committed Apr 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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+.

0 comments on commit 11537c5

Please sign in to comment.