core/class/descendants_spec relying on a particular GC behavior
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 622
- Forks
- 402
- Avg merge
- 14h 51m
- Merged PRs (30d)
- 6
Description
I'm implementing Class#{subclasses,descendants} in Opal. While in MRI GC may run quite consistently for this test to always pass, in Opal we have to rely on JS behavior - and it doesn't help us. A similar situation may happen on other Ruby implementations.
Let's take a look at this:
And then this:
A question would be - do we really want to hardcode a need for GC for this part or an assumption that it will be ran between those 2 tests?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read core/class/descendants_spec.rb at the cited line and compare it with core/module/remove_method_spec.rb. Determine whether the specs should depend on GC running between tests, then update the relevant specification once the expected behavior across Ruby implementations is agreed; done means the test no longer relies on an unsuitable GC assumption.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100