From 075a1e21fa59433976dd6860b775a280db10f606 Mon Sep 17 00:00:00 2001 From: Akshay Vishnoi Date: Fri, 11 Apr 2014 17:57:16 +0530 Subject: Add more test case for #demodulize, Improve documentation --- activesupport/lib/active_support/core_ext/string/inflections.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/lib/active_support/core_ext') 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 -- cgit v1.2.3