diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 688cba03dba74fea10a6dc4039dbfd06d2c8ea0e..8f0f50919ff0de57a9f6a3eeddfbb7b0bc0e90e1 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -75,6 +75,7 @@ def self.#{name}=(val) val end + remove_method :#{name} if method_defined?(:#{name}) def #{name} defined?(@#{name}) ? @#{name} : singleton_class.#{name} end