summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
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