Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ActiveSupport::Deprecation.deprecate_methods not to expose internal methods #36037

Merged
merged 1 commit into from Apr 19, 2019

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Apr 19, 2019

In #33325, deprecate_methods is replaced from prepend to completely
emurated alias_method_chain, it exposed two internal methods
xxx_with_deprecation and xxx_without_deprecation.

After that, #34648 restored the prepend implementation, which doesn't
expose any internal methods, so we no longer be able to ensure to always
expose that internal methods.

As I said at #33325 (comment),
I think that internal methods exposed is not a specification but a
limitation when using alias_method_chain, there is no longer a reason
to follow that limitation.

… internal methods

In rails#33325, `deprecate_methods` is replaced from `prepend` to completely
emurated `alias_method_chain`, it exposed two internal methods
`xxx_with_deprecation` and `xxx_without_deprecation`.

After that, rails#34648 restored the `prepend` implementation, which doesn't
expose any internal methods, so we no longer be able to ensure to always
expose that internal methods.

As I said at rails#33325 (comment),
I think that internal methods exposed is not a specification but a
limitation when using `alias_method_chain`, there is no longer a reason
to follow that limitation.
@kamipo kamipo merged commit 75aeb36 into rails:master Apr 19, 2019
@kamipo kamipo deleted the deprecate_methods branch April 19, 2019 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant