summaryrefslogtreecommitdiff
path: root/tool/missing-baseruby.bat
blob: 45cee8c8788ed0084933cfb4af63010ed27f7002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
:"" == "
@echo off || (
  :warn
    echo>&2.%~1
  goto :eof
  :abort
    exit /b 1
)||(
:)"||(
  # necessary libraries
  require 'erb'
  require 'fileutils'
  require 'tempfile'
  s = %^#
)
: ; call() { local call=${1#:}; shift; $call "$@"; }
: ; warn() { echo "$1" >&2; }
: ; abort () { exit 1; }

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]