Skip to content
  • Gareth Adams's avatar
    f705c39f
    Remove redundant `parent` method from RESTRICTED_CLASS_METHODS · f705c39f
    Gareth Adams authored
    Previously, `parent` was added as one of the RESTRICTED_CLASS_METHODS as
    part of a commit (94b7328b) in 2014 that stopped Rails `enum`s from being
    able to redefine important class methods.
    
    At the time, Rails monkey-patched `Module` with a `parent` class method
    that returned a module's containing module if it was nested.
    
    However, in October 2020 (167b4153) in Rails 6.1, this method was
    deprecated in favour of a renamed method `module_parent`. As such, the
    `parent` method doesn't need to be a restricted class method any more.
    f705c39f
    Remove redundant `parent` method from RESTRICTED_CLASS_METHODS
    Gareth Adams authored
    Previously, `parent` was added as one of the RESTRICTED_CLASS_METHODS as
    part of a commit (94b7328b) in 2014 that stopped Rails `enum`s from being
    able to redefine important class methods.
    
    At the time, Rails monkey-patched `Module` with a `parent` class method
    that returned a module's containing module if it was nested.
    
    However, in October 2020 (167b4153) in Rails 6.1, this method was
    deprecated in favour of a renamed method `module_parent`. As such, the
    `parent` method doesn't need to be a restricted class method any more.
Loading