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

@@ -50,14 +50,18 @@
5050 TIMEOUT60 := $(if $(TIMEOUT_BIN),$(TIMEOUT_BIN) 60,)
5151
5252 # Reference Ruby for `make test` / `make bench` output comparison.
53-# Prefer `miniruby` (Ruby's bootstrap interpreter; matz's local copy is
54-# 4.1.0dev with +PRISM, so newer features like `it` block param work)
55-# when available; the test/bench harness falls back to `ruby` per-file
56-# if miniruby exits non-zero — covers tests that `require` extension
57-# libraries (stringio, etc.) which the bootstrap miniruby can't load.
58-# Environments without miniruby use `ruby` directly. Override via
59-# `REF_RUBY=ruby make test` if a specific primary is wanted.
60-REF_RUBY ?= $(shell command -v miniruby >/dev/null 2>&1 && echo miniruby || echo ruby)
53+# Defaults to `ruby` (the system CRuby), matching the historical
54+# behaviour. Override on the command line when a newer or differently-
55+# built interpreter is needed, e.g.
56+#
57+# REF_RUBY=miniruby make test
58+#
59+# to use a freshly-built bootstrap interpreter (Ruby's `miniruby`)
60+# that supports newer features like the `it` block param. The
61+# harness falls back to `ruby` per-file if `REF_RUBY` exits non-zero
62+# — covers tests that `require` extension libraries (stringio, etc.)
63+# which the bootstrap miniruby can't load.
64+REF_RUBY ?= ruby
6165
6266 # Prism library: prefer vendor/prism (fetched via `make deps`), then
6367 # fall back to the Prism gem if one is installed. Override by setting