Remove unused tempfile finalizer ivar sets - #42
Draft
HassanAkbar wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes a no-op Tempfile “finalizer suppression” workaround from the ZipExtractor specs (keeping the actual Windows-safe close+delete behavior) and updates the associated TODO note documenting the cleanup.
Changes:
- Removed
instance_variable_set(:@finalizer, ...)andTempfile.remove_instance_variableusage fromzip_extractor_spec.rb. - Updated the TODO entry describing the now-removed ivar hacks and current verification steps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| TODO/04-reduce-spec-ivar-use.md | Updates the project TODO note describing the “instance_variable_*” cleanup and verification guidance. |
| spec/uniword/infrastructure/zip_extractor_spec.rb | Removes ineffective Tempfile “finalizer suppression” code while preserving the close+delete workaround for Windows file locking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HassanAkbar
force-pushed
the
chore/todo-04-spec-ivars
branch
from
July 29, 2026 14:27
dab7b3c to
be0edf6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
TODO/04-reduce-spec-ivar-use.md:41
- This note hard-codes the "installed version" as
tempfile-0.3.1, but the repo doesn’t pin tempfile (no lockfile) and CI/Ruby version changes will make that statement stale. The key point is the ivar name (@finalizer_manager), so it’d be clearer and more future-proof to avoid asserting a specific installed version.
**`Tempfile` has no `@finalizer` ivar.** The installed version
(`tempfile-0.3.1`) uses `@finalizer_manager`:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Metanorma PR checklist