aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-24 15:42:52 -0300
committerEmilio Tagua <miloops@gmail.com>2010-09-27 11:19:22 -0300
commit6b135f7e465a6cd1c8162432f6e0caa820316c44 (patch)
tree6682516f7841f4e78fb38efff75889503029f98c /activesupport
parent0cb1d87cd5e2a76c9cd12b5387dd8f25318d494b (diff)
downloadrails-6b135f7e465a6cd1c8162432f6e0caa820316c44.tar.gz
rails-6b135f7e465a6cd1c8162432f6e0caa820316c44.tar.bz2
rails-6b135f7e465a6cd1c8162432f6e0caa820316c44.zip
Remove method if already exists to avoid warnings.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/class/attribute.rb1
1 files changed, 1 insertions, 0 deletions
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