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

Avoid busting the global constant cache #8

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

casperisfine
Copy link

Ref: https://bugs.ruby-lang.org/issues/18589

Object#extend(mod) bump the global constant cache if the module has constants of its own.

So by moving these constants outside of Meta we avoid bumping the cache.

cc @hsbt

`Object#extend(mod)` bump the global constant cache if the module
has constants of its own.

So by moving these constants outside of `Meta` we avoid bumping
the cache.
@casperisfine
Copy link
Author

Sorry to be a bother, but could this PR be considered?

@hsbt
Copy link
Member

hsbt commented Oct 6, 2022

I confirmed to keep RubyVM.stat(:global_constant_state) value after this change. I'll merge this.

But I'm not familir with the internal of open-uri. If we have an issue caused by this change, I'll revert this.

Thanks ❤️

@hsbt hsbt merged commit 062cffd into ruby:master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants