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:
parent
e84788e60c
commit
11537c57cb
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ class Array
|
||||||
# %w( a b c d ).from(10) # => %w()
|
# %w( a b c d ).from(10) # => %w()
|
||||||
# %w().from(0) # => %w()
|
# %w().from(0) # => %w()
|
||||||
def from(position)
|
def from(position)
|
||||||
[position, length] || []
|
self[position, length] || []
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the beginning of the array up to +position+.
|
# Returns the beginning of the array up to +position+.
|
||||||
|
|
Loading…
Reference in a new issue