summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2026-01-05 21:30:06 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2026-01-06 17:09:27 +0000
commit49ca241d6d5f589dec8f42fecdc8ecb96690b859 (patch)
tree79998ea8dfd7e6a2d26d0ef0a6a639e32fb5eae5 /tool
parent925d04108b8fff7dfa14ccd8ac19fd1522cc99c3 (diff)
Show a more verbose message if BASERUBY is too old
Diffstat (limited to 'tool')
-rwxr-xr-xtool/missing-baseruby.bat9
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/missing-baseruby.bat b/tool/missing-baseruby.bat
index 45cee8c878..d39568fe86 100755
--- a/tool/missing-baseruby.bat
+++ b/tool/missing-baseruby.bat
@@ -21,5 +21,10 @@ call :warn "executable host ruby is required. use --with-baseruby option."
call :warn "Note that BASERUBY must be Ruby 3.1.0 or later."
call :abort
(goto :eof ^;)
-abort unless defined?(RubyVM::InstructionSequence)
-abort if RUBY_VERSION < s[%r"warn .*Ruby ([\d.]+)(?:\.0)?",1]
+verbose = true if ARGV[0] == "--verbose"
+case
+when !defined?(RubyVM::InstructionSequence)
+ abort(*(["BASERUBY must be CRuby"] if verbose))
+when RUBY_VERSION < s[%r[warn .*\KBASERUBY .*Ruby ([\d.]+)(?:\.0)?.*(?=\")],1]
+ abort(*(["#{$&}. Found: #{RUBY_VERSION}"] if verbose))
+end