From f98e75a3e2b1665bd1da28b9456a296cc3c35bbc Mon Sep 17 00:00:00 2001 From: Kristijan Novoselic Date: Tue, 9 Jun 2015 19:00:24 +0200 Subject: Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes --- activesupport/lib/active_support/concern.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/concern.rb b/activesupport/lib/active_support/concern.rb index 4082d2d464..0403eb70ca 100644 --- a/activesupport/lib/active_support/concern.rb +++ b/activesupport/lib/active_support/concern.rb @@ -132,7 +132,7 @@ module ActiveSupport end def class_methods(&class_methods_module_definition) - mod = const_defined?(:ClassMethods) ? + mod = const_defined?(:ClassMethods, false) ? const_get(:ClassMethods) : const_set(:ClassMethods, Module.new) -- cgit v1.2.3