1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix code formatting.

This commit is contained in:
Samuel Williams 2021-12-18 21:42:17 +13:00
parent 1560cc1688
commit 78c175280b
Notes: git 2021-12-18 19:11:12 +09:00

View file

@ -8,6 +8,7 @@ This document gives some helpful instructions which should make your experience
It's common to want to compile things as quickly as possible. Ensuring `make` has the right `--jobs` flag will ensure all processors are utilized when building software projects. To do this effectively, you can set `MAKEFLAGS` in your shell configuration/profile: It's common to want to compile things as quickly as possible. Ensuring `make` has the right `--jobs` flag will ensure all processors are utilized when building software projects. To do this effectively, you can set `MAKEFLAGS` in your shell configuration/profile:
``` shell
# On macOS with Fish shell: # On macOS with Fish shell:
export MAKEFLAGS="--jobs "(sysctl -n hw.ncpu) export MAKEFLAGS="--jobs "(sysctl -n hw.ncpu)
@ -19,22 +20,27 @@ It's common to want to compile things as quickly as possible. Ensuring `make` ha
# On Linux with Bash/ZSH shell: # On Linux with Bash/ZSH shell:
export MAKEFLAGS="--jobs $(nproc)" export MAKEFLAGS="--jobs $(nproc)"
```
## Configure Ruby ## Configure Ruby
It's generally advisable to use a build directory. It's generally advisable to use a build directory.
``` shell
./autogen.sh ./autogen.sh
mkdir build mkdir build
cd build cd build
../configure --prefix $HOME/.rubies/ruby-head ../configure --prefix $HOME/.rubies/ruby-head
make install make install
```
### Without Documentation ### Without Documentation
If you are frequently building Ruby, this will reduce the time it takes to `make install`. If you are frequently building Ruby, this will reduce the time it takes to `make install`.
``` shell
../configure --disable-install-doc ../configure --disable-install-doc
```
## Running Ruby ## Running Ruby
@ -42,7 +48,9 @@ If you are frequently building Ruby, this will reduce the time it takes to `make
You can create a file in the Ruby source root called `test.rb`. You can build `miniruby` and execute this script: You can create a file in the Ruby source root called `test.rb`. You can build `miniruby` and execute this script:
``` shell
make run make run
```
If you want more of the standard library, you can use `runruby` instead of `run`. If you want more of the standard library, you can use `runruby` instead of `run`.
@ -50,20 +58,28 @@ If you want more of the standard library, you can use `runruby` instead of `run`
There are a set of tests in `bootstraptest/` which cover most basic features of the core Ruby language. There are a set of tests in `bootstraptest/` which cover most basic features of the core Ruby language.
``` shell
make test make test
```
### Run Extensive Tests ### Run Extensive Tests
There are extensive tests in `test/` which cover a wide range of features of the Ruby core language. There are extensive tests in `test/` which cover a wide range of features of the Ruby core language.
``` shell
make test-all make test-all
```
You can run specific tests by specifying their path: You can run specific tests by specifying their path:
``` shell
make test-all TESTS=../test/fiber/test_io.rb make test-all TESTS=../test/fiber/test_io.rb
```
### Run RubySpec Tests ### Run RubySpec Tests
RubySpec is a project to write a complete, executable specification for the Ruby programming language. RubySpec is a project to write a complete, executable specification for the Ruby programming language.
``` shell
make test-all test-rubyspec make test-all test-rubyspec
```