Skip to content

Commit cdfca90

Browse files
authored
Merge pull request rails#50675 from gareth/remove-redundant-restricted-class-method
Remove redundant `parent` method from RESTRICTED_CLASS_METHODS
2 parents e786865 + f705c39 commit cdfca90

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

activerecord/lib/active_record/attribute_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module AttributeMethods
2020
include Serialization
2121
end
2222

23-
RESTRICTED_CLASS_METHODS = %w(private public protected allocate new name parent superclass)
23+
RESTRICTED_CLASS_METHODS = %w(private public protected allocate new name superclass)
2424

2525
class GeneratedAttributeMethods < Module # :nodoc:
2626
LOCK = Monitor.new

activerecord/test/cases/enum_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def self.name; "Book"; end
535535
:save, # generates #save!, which conflicts with an AR method
536536
:proposed, # same value as an existing enum
537537
:public, :private, :protected, # some important methods on Module and Class
538-
:name, :parent, :superclass,
538+
:name, :superclass,
539539
:id # conflicts with AR querying
540540
]
541541

activerecord/test/cases/scoping/named_scoping_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ def pro; end
363363
:protected,
364364
:private,
365365
:name,
366-
:parent,
367366
:superclass
368367
]
369368

0 commit comments

Comments
 (0)