aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2015-03-23 20:07:42 -0400
committerArthur Nogueira Neves <github@arthurnn.com>2015-03-23 20:07:42 -0400
commit2f14153a53fd3b39ca98b5871a33367105c38b0a (patch)
tree6fb4f6f4502590dc16d75f5cb3be33a53b080e5d /activesupport/lib
parent503d9e12887e21015f9b241944dd850614c3e1b3 (diff)
parenta64f3e419598bce0ce2eb9e41dcccb676edb02e2 (diff)
downloadrails-2f14153a53fd3b39ca98b5871a33367105c38b0a.tar.gz
rails-2f14153a53fd3b39ca98b5871a33367105c38b0a.tar.bz2
rails-2f14153a53fd3b39ca98b5871a33367105c38b0a.zip
Merge pull request #19481 from davidcornu/activesupport/normalize-to-sentence
Make sure Array#to_sentence always returns a String
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/array/conversions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb
index 080e3b5ef7..d80df21e7d 100644
--- a/activesupport/lib/active_support/core_ext/array/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -74,7 +74,7 @@ class Array
when 0
''
when 1
- self[0].to_s.dup
+ "#{self[0]}"
when 2
"#{self[0]}#{options[:two_words_connector]}#{self[1]}"
else