From 758df587cc478a8ba58d922f768c3971b6a136c6 Mon Sep 17 00:00:00 2001 From: Aaron Ang Date: Tue, 15 Mar 2016 10:51:48 +0100 Subject: Add comments to ActiveSupport::Dependencies to help understanding In a previous patch, all log-related stuff was removed. However, some logs are still useful to understand the code. Therefore, in this patch, I put those log messages back as comments. [ci skip] --- activesupport/lib/active_support/dependencies.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index fc0a358645..ee62c0739e 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -734,6 +734,7 @@ module ActiveSupport #:nodoc: begin constantized = parent.const_get(to_remove, false) rescue NameError + # Skip when const is unreachable. return else constantized.before_remove_const if constantized.respond_to?(:before_remove_const) @@ -743,6 +744,7 @@ module ActiveSupport #:nodoc: begin parent.instance_eval { remove_const to_remove } rescue NameError + # Skip when const is unreachable. end end end -- cgit v1.2.3