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

Remove useless include in DescendantsTracker #49108

Merged
merged 1 commit into from Sep 1, 2023

Conversation

casperisfine
Copy link
Contributor

Either we are on a modern Ruby with Class#subclass, in which case DescendantsTracker#subclass isn't defined, so we don't need the filtering module.

Or we're on an old Ruby, and DescendantsTracker.subclass already does the filtering.

Either we are on a modern Ruby with `Class#subclass`, in which case
`DescendantsTracker#subclass` isn't defined, so we don't need the
filtering module.

Or we're on an old Ruby, and `DescendantsTracker.subclass` already does
the filtering.
@casperisfine casperisfine marked this pull request as ready for review September 1, 2023 15:11
@byroot byroot merged commit f82f0da into rails:main Sep 1, 2023
4 checks passed
@nirvdrum
Copy link
Contributor

nirvdrum commented Sep 1, 2023

I can confirm this helps with a compatibility problem in TruffleRuby. We're working to fix the core issue in TruffleRuby, but it's non-trivial and obviously won't help already released versions. This PR allows Rails to run with already released versions of TruffleRuby.

casperisfine pushed a commit to Shopify/rails that referenced this pull request Sep 1, 2023
Followup: rails#49108

DescendantsTracker need to work whether the `Class#descendants` core
ext is loaded or not. I missed that in the previous PR.
@eregon
Copy link
Contributor

eregon commented Sep 1, 2023

Nice!

@rafaelfranca rafaelfranca deleted the refactor-core-ext-subclasses branch September 1, 2023 18:18
eregon added a commit to eregon/yjit-bench that referenced this pull request Sep 16, 2023
* This notably includes this fix which is necessary on truffleruby:
  rails/rails#49108
eregon added a commit to eregon/yjit-bench that referenced this pull request Sep 18, 2023
* This notably includes this fix which is necessary on truffleruby:
  rails/rails#49108
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

4 participants