Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[].from(0) actually returns [], not nil

commit 25550d902260e398a836ee7be13a33369ae24510 1 parent b67dc00
@radar radar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/core_ext/array/access.rb
View
2  activesupport/lib/active_support/core_ext/array/access.rb
@@ -4,7 +4,7 @@ class Array
# %w( a b c d ).from(0) # => %w( a b c d )
# %w( a b c d ).from(2) # => %w( c d )
# %w( a b c d ).from(10) # => nil
- # %w().from(0) # => nil
+ # %w().from(0) # => %w()
def from(position)
self[position..-1]
end
Please sign in to comment.
Something went wrong with that request. Please try again.