基本的にはここを読めばOK
コンパイルする
https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#running-tests の
Generate the configuration files and build
に添って実行
.shell-session
cd ruby-trunk
autoconf
mkdir build && cd build # its good practice to build outside of source dir
mkdir ~/.rubies # we will install to .rubies/ruby-trunk in our home dir
../configure --prefix="${HOME}/.rubies/ruby-trunk"
make up && make install
configure については、homebrew で openssl をインストールしている場合、以下のようにする
.shell-session
../configure --prefix="${HOME}/.rubies/ruby-trunk" --with-openssl-dir="$(brew --prefix openssl)"
テスト実行
make test で、テストに必要な -test- ディレクトリが生成される
.shell-session
make test
make test-all
一部のテストだけ実行したい場合
.shell-session
make test-all TESTS=../test/csv/ts_all.rb