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/inflector/methods.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/lib/active_support/inflector/methods.rb') diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index a270c4452f..6229d15619 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -172,6 +172,8 @@ module ActiveSupport # # 'ActiveRecord::CoreExtensions::String::Inflections'.demodulize # => "Inflections" # 'Inflections'.demodulize # => "Inflections" + # '::Inflections'.demodulize # => "Inflections" + # ''.demodulize # => '' # # See also +deconstantize+. def demodulize(path) -- cgit v1.2.3