diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2009-12-17 07:41:40 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2009-12-17 07:41:40 +1000 |
commit | 25550d902260e398a836ee7be13a33369ae24510 (patch) | |
tree | 4d03dcee3f41bfcf19baafef7321e14a84865c6b | |
parent | b67dc00eae310f61e02f1cae27ec78eb8c1c599b (diff) | |
download | rails-25550d902260e398a836ee7be13a33369ae24510.tar.gz rails-25550d902260e398a836ee7be13a33369ae24510.tar.bz2 rails-25550d902260e398a836ee7be13a33369ae24510.zip |
[].from(0) actually returns [], not nil
-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 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 |