aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/array/access.rb2
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 2bba0974b3..2df4fd1da1 100644
--- a/activesupport/lib/active_support/core_ext/array/access.rb
+++ b/activesupport/lib/active_support/core_ext/array/access.rb
@@ -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+.