1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fixed a small bug with Array#from core_ext

This commit is contained in:
Josh Kalderimis 2011-04-27 17:35:00 +02:00
parent e84788e60c
commit 11537c57cb

View file

@ -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+.