aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/inflections.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2016-03-31 02:11:19 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2016-03-31 19:52:10 +0300
commitf2489f493b794ee83a86e746b6240031acb8994e (patch)
tree2cf9a32c4e351373ff68e526ba8c042dbf8e29b4 /activesupport/lib/active_support/core_ext/string/inflections.rb
parenta564fecbd0c96815664067b727817045459cae98 (diff)
downloadrails-f2489f493b794ee83a86e746b6240031acb8994e.tar.gz
rails-f2489f493b794ee83a86e746b6240031acb8994e.tar.bz2
rails-f2489f493b794ee83a86e746b6240031acb8994e.zip
Fix method String#upcase_first
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/inflections.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/inflections.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb
index f301eeac43..7277f51076 100644
--- a/activesupport/lib/active_support/core_ext/string/inflections.rb
+++ b/activesupport/lib/active_support/core_ext/string/inflections.rb
@@ -224,7 +224,9 @@ class String
# Converts just the first character to uppercase.
#
- # 'what a Lovely Day'.upcase_first # => "What a Lovely Day"
+ # 'what a Lovely Day'.upcase_first # => "What a Lovely Day"
+ # 'w'.upcase_first # => "W"
+ # ''.upcase_first # => ""
def upcase_first
ActiveSupport::Inflector.upcase_first(self)
end