mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
fixed a small bug with Array#from core_ext
This commit is contained in:
@@ -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+.
|
||||
|
||||
Reference in New Issue
Block a user