From 25550d902260e398a836ee7be13a33369ae24510 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Thu, 17 Dec 2009 07:41:40 +1000 Subject: [].from(0) actually returns [], not nil --- activesupport/lib/active_support/core_ext/array/access.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb index d7606bb9b0..c69a015f12 100644 --- a/activesupport/lib/active_support/core_ext/array/access.rb +++ b/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 -- cgit v1.2.3