Skip to content
This repository
Browse code

Merged pull request #324 from joshk/fix_array_from.

fixed a small bug with Array#from core_ext
  • Loading branch information...
commit c992045da3d7f1767ad3dff0fd9d5b275e4e3e62 2 parents e84788e + 11537c5
Joshua Peek josh authored
2  activesupport/lib/active_support/core_ext/array/access.rb
@@ -6,7 +6,7 @@ class Array
6 6 # %w( a b c d ).from(10) # => %w()
7 7 # %w().from(0) # => %w()
8 8 def from(position)
9   - [position, length] || []
  9 + self[position, length] || []
10 10 end
11 11
12 12 # Returns the beginning of the array up to +position+.

0 comments on commit c992045

Please sign in to comment.
Something went wrong with that request. Please try again.