Skip to content

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants