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