Skip to content

Do not pollute source directory by tests#8989

Merged
hsbt merged 2 commits intoruby:masterfrom
nobu:test-tmpdir
Jan 26, 2026
Merged

Do not pollute source directory by tests#8989
hsbt merged 2 commits intoruby:masterfrom
nobu:test-tmpdir

Conversation

@nobu
Copy link
Copy Markdown
Member

@nobu nobu commented Sep 23, 2025

What was the end-user or developer problem that led to this PR?

Tests should not pollute the source directory by temporary files.

What is your fix for the problem, implemented in this PR?

Respect the TMPDIR environment variable set by the ruby core test runner.

Make sure the following tasks are checked


def tmp_root
source_root.join("tmp")
ruby_core? && (tmpdir = ENV["TMPDIR"]) ? Pathname(tmpdir) : source_root.join("tmp")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is ruby_core? needed? Not possible to just respect ENV["TMPDIR"] if present?

@hsbt hsbt enabled auto-merge January 26, 2026 06:43
@hsbt hsbt merged commit 3aa3ee3 into ruby:master Jan 26, 2026
92 checks passed
hsbt added a commit that referenced this pull request Jan 26, 2026
This reverts commit 3aa3ee3, reversing
changes made to d1ff3df.
hsbt added a commit that referenced this pull request Jan 26, 2026
Revert "Merge pull request #8989 from nobu/test-tmpdir"
hsbt added a commit that referenced this pull request Jan 30, 2026
…st-tmpdir""

This reverts commit 6e00da098abacd8c9ef0ea621cb1832e654b1813.
hsbt added a commit that referenced this pull request Jan 30, 2026
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