diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array/access.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/access.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb index 2df4fd1da1..6162f7af27 100644 --- a/activesupport/lib/active_support/core_ext/array/access.rb +++ b/activesupport/lib/active_support/core_ext/array/access.rb @@ -16,7 +16,7 @@ class Array # %w( a b c d ).to(10) # => %w( a b c d ) # %w().to(0) # => %w() def to(position) - self[0..position] + self.first position + 1 end # Equal to <tt>self[1]</tt>. |