Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.3.8) is shown here.
to(position)
public
Returns the beginning of the array up to
position.
%w( a b c d ).to(0)
%w( a b c d ).to(2)
%w( a b c d ).to(10)
%w().to(0)
# File activesupport/lib/active_support/core_ext/array/access.rb, line 22
def to(position)
self[0..position]
end