From 36699977f2ddbb937aac97998d2d8503499c57e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 23 Sep 2011 16:49:05 +0200 Subject: Update CHANGELOG for safe_constantize. --- activesupport/lib/active_support/inflector/methods.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 dd232a5e2f..934529d496 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -239,10 +239,13 @@ module ActiveSupport # "C".safe_constantize # => 'outside', same as ::C # end # - # nil is returned when the name is not in CamelCase or the constant is + # nil is returned when the name is not in CamelCase or the constant (or part of it) is # unknown. # # "blargle".safe_constantize # => nil + # "UnknownModule".safe_constantize # => nil + # "UnknownModule::Foo::Bar".safe_constantize # => nil + # def safe_constantize(camel_cased_word) begin constantize(camel_cased_word) -- cgit v1.2.3