This commit is contained in:
Nobuyoshi Nakada 2022-01-09 12:41:30 +09:00
Родитель 83983bacbc
Коммит b43ad6b802
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
1 изменённых файлов: 18 добавлений и 8 удалений

Просмотреть файл

@ -1,12 +1,16 @@
# Ruby Hacking Guide
This document gives some helpful instructions which should make your experience as a Ruby core developer easier.
This document gives some helpful instructions which should make your
experience as a Ruby core developer easier.
## Setup
### Make
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:
@ -36,7 +40,8 @@ make install
### 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
@ -46,13 +51,15 @@ If you are frequently building Ruby, this will reduce the time it takes to `make
### Run Local Test Script
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
```
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`.
## Running Tests
@ -64,7 +71,8 @@ make check
### Run Bootstrap Tests
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
@ -72,7 +80,8 @@ make test
### 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
@ -86,7 +95,8 @@ make test-all TESTS=../test/fiber/test_io.rb
### 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-spec