Skip to content

vm_check.sh takes the reference ruby through tools/ref_ruby.sh (#296's review) - #298

Merged
284km merged 1 commit into
mainfrom
ci-vm-check-ref-ruby
Nov 25, 2026
Merged

284km merged 1 commit into
mainfrom
ci-vm-check-ref-ruby

Conversation

@284km

@284km 284km commented Nov 25, 2026

Copy link
Copy Markdown
Owner

#296's review suggested this: when the rbenv build was not there, vm_check.sh took whatever ruby was on PATH and did not check its version. It now takes the reference ruby as the other gates do, through tools/ref_ruby.sh: rbenv's build of the pinned version when PATH's ruby is another, PATH's ruby when it is that version (CI's setup-ruby, REF_RUBY_VERSION 4.0.10), and a refusal otherwise. RUBY= still names one outright. ci.yml is not changed.

Checked

On main, with an empty environment (env -i) but for HOME and PATH:

HOME PATH result
with rbenv's 4.0.10 /usr/bin:/bin (macOS's ruby 2.6) rbenv's 4.0.10 selected, vm_check: 245/245
an empty directory (no rbenv) /usr/bin:/bin refused, "the recorded numbers are against 4.0.10 ...", exit 2
an empty directory 4.0.10's bin first, as CI's vm_check: 245/245

🤖 Generated with Claude Code

tools/ref_ruby.sh: rbenv's build of the pinned version when PATH's ruby is
another, PATH's when it is that version (CI's setup-ruby), and a refusal
otherwise -- not whatever ruby PATH has.

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed a472fe5. No Critical / Major / Minor findings. vm_check.sh now takes the reference ruby the way every gate does, by sourcing tools/ref_ruby.sh: rbenv's 4.0.10 when PATH's ruby is another version, PATH's ruby when it is 4.0.10 (CI's setup-ruby), and exit 2 otherwise, with the gem-dir checks of #224/#241. RUBY= still overrides. The author checked three environments. Suggestion: after sourcing, RUBY="$REF_RUBY_BIN" would use the real binary rather than rbenv's shim (command -v ruby); ref_ruby.sh notes that the shim adds RBENV_* and RUBYLIB to the child's ENV, which matters if a snippet ever compares ENV. git merge-tree against main: clean. No mere-pr-review-watch inline comments. Merging.

@284km
284km merged commit 1a3380b into main Nov 25, 2026
5 of 19 checks passed
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.

1 participant