From 94b7328b08fcc55e82bfcaa34a25ae718921ae1c Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Thu, 4 Sep 2014 00:26:27 -0700 Subject: Enums shouldn't ruin people's anniversaries Added a few more methods on Module/Class to the dangerous class methods blacklist. (Technically, allocate and new are already protected currently because we happen to redefine them in the current implantation.) Closes #16792 --- activerecord/lib/active_record/attribute_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index ceee96b3a8..43a3993898 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -31,7 +31,7 @@ module ActiveRecord end } - BLACKLISTED_CLASS_METHODS = %w(private public protected) + BLACKLISTED_CLASS_METHODS = %w(private public protected allocate new name parent superclass) class AttributeMethodCache def initialize -- cgit v1.2.3