From 6b135f7e465a6cd1c8162432f6e0caa820316c44 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Fri, 24 Sep 2010 15:42:52 -0300 Subject: Remove method if already exists to avoid warnings. --- activesupport/lib/active_support/core_ext/class/attribute.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 688cba03db..8f0f50919f 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 @@ class Class val end + remove_method :#{name} if method_defined?(:#{name}) def #{name} defined?(@#{name}) ? @#{name} : singleton_class.#{name} end -- cgit v1.2.3