Commit f4734cf3
f4734cf3976bMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified
Description
build: keep ruby as default REF_RUBY, drop miniruby auto-detect
The previous commit (c11195e) auto-detected miniruby on PATH and
made it the default. That works for matz's box but masks a different
default on contributor / CI machines, where miniruby either isn't
present or points at an unrelated build. Switch to an explicit
opt-in: REF_RUBY defaults to ruby everywhere; matz invokes
REF_RUBY=miniruby make test when the freshly-built Ruby's newer
semantics are wanted.
The per-file fallback logic stays in place: when REF_RUBY is
something other than ruby and exits non-zero, the harness retries
the file under ruby. So REF_RUBY=miniruby make test still passes
on stringio-using tests that the bootstrap miniruby can't require.
Behaviour matrix unchanged from c11195e for the explicit-override case; only the default differs. CI / fresh checkouts: identical to pre-c11195e behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- f4734cf3976b
- Parent
- 573c514cf9a4
MakefilemodifiedView file
TIMEOUT60 := $(if $(TIMEOUT_BIN),$(TIMEOUT_BIN) 60,)# Reference Ruby for `make test` / `make bench` output comparison.# Prefer `miniruby` (Ruby's bootstrap interpreter; matz's local copy is# 4.1.0dev with +PRISM, so newer features like `it` block param work)# when available; the test/bench harness falls back to `ruby` per-file# if miniruby exits non-zero — covers tests that `require` extension# libraries (stringio, etc.) which the bootstrap miniruby can't load.# Environments without miniruby use `ruby` directly. Override via# `REF_RUBY=ruby make test` if a specific primary is wanted.REF_RUBY ?= $(shell command -v miniruby >/dev/null 2>&1 && echo miniruby || echo ruby)# Defaults to `ruby` (the system CRuby), matching the historical# behaviour. Override on the command line when a newer or differently-# built interpreter is needed, e.g.## REF_RUBY=miniruby make test## to use a freshly-built bootstrap interpreter (Ruby's `miniruby`)# that supports newer features like the `it` block param. The# harness falls back to `ruby` per-file if `REF_RUBY` exits non-zero# — covers tests that `require` extension libraries (stringio, etc.)# which the bootstrap miniruby can't load.REF_RUBY ?= ruby# Prism library: prefer vendor/prism (fetched via `make deps`), then# fall back to the Prism gem if one is installed. Override by setting