aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-04-11 17:57:16 +0530
committerAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-04-11 17:57:16 +0530
commit075a1e21fa59433976dd6860b775a280db10f606 (patch)
tree4d1ebc5ca7fcbe1187002d0f01be1d151a13bc66 /activesupport/lib/active_support/core_ext
parent8c1406cf256c0140748c98cd3c533afc504e0007 (diff)
downloadrails-075a1e21fa59433976dd6860b775a280db10f606.tar.gz
rails-075a1e21fa59433976dd6860b775a280db10f606.tar.bz2
rails-075a1e21fa59433976dd6860b775a280db10f606.zip
Add more test case for #demodulize, Improve documentation
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/string/inflections.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb
index cf9b1a4ec0..18273573e0 100644
--- a/activesupport/lib/active_support/core_ext/string/inflections.rb
+++ b/activesupport/lib/active_support/core_ext/string/inflections.rb
@@ -130,6 +130,8 @@ class String
#
# 'ActiveRecord::CoreExtensions::String::Inflections'.demodulize # => "Inflections"
# 'Inflections'.demodulize # => "Inflections"
+ # '::Inflections'.demodulize # => "Inflections"
+ # ''.demodulize # => ''
#
# See also +deconstantize+.
def demodulize