diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:51:52 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:51:52 +0000 |
commit | 4c5db2c7eac5fc7fe76e0c0cd12d8adf5b7ea4f1 (patch) | |
tree | 1d5cfd2c12ab8143cc24c8bdc45200689f530cf8 /activesupport/lib | |
parent | 3574ab30596ad3313607927505aed115b740fc87 (diff) | |
download | rails-4c5db2c7eac5fc7fe76e0c0cd12d8adf5b7ea4f1.tar.gz rails-4c5db2c7eac5fc7fe76e0c0cd12d8adf5b7ea4f1.tar.bz2 rails-4c5db2c7eac5fc7fe76e0c0cd12d8adf5b7ea4f1.zip |
Fixed that Array#to_sentence will return "" on an empty array instead of ", and" (closes #3842, #4031) [rubyonrails@beautifulpixel.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/conversions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index bfa92c3031..46962ded1b 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -11,6 +11,8 @@ module ActiveSupport #:nodoc: options.reverse_merge! :connector => 'and', :skip_last_comma => false case length + when 0 + "" when 1 self[0] when 2 |