ruby-changes:70304
From: Samuel <ko1@a...>
Date: Sat, 18 Dec 2021 15:15:37 +0900 (JST)
Subject: [ruby-changes:70304] 75b5a4808f (master): Initial hacking guide.
https://git.ruby-lang.org/ruby.git/commit/?id=75b5a4808f From 75b5a4808fce6e6a11ef43a12c399e4e2eb63e86 Mon Sep 17 00:00:00 2001 From: Samuel Williams <samuel.williams@o...> Date: Sat, 18 Dec 2021 18:17:33 +1300 Subject: Initial hacking guide. --- doc/hacking.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/hacking.md diff --git a/doc/hacking.md b/doc/hacking.md new file mode 100644 index 00000000000..fe77232bd01 --- /dev/null +++ b/doc/hacking.md @@ -0,0 +1,51 @@ https://github.com/ruby/ruby/blob/trunk/doc/hacking.md#L1 +# Ruby Hacking Guide + +This document gives some helpful instructions which should make your experience as a Ruby core developer easier. + +## Configure Ruby + +It's generally advisable to use a build directory. + + ./autogen.sh + mkdir build + cd build + ../configure --prefix $HOME/.rubies/ruby-head + make -j16 install + +### Without Documentation + +If you are frequently building Ruby, this will reduce the time it takes to `make install`. + + ../configure --disable-install-doc + +## Running Ruby + +### 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: + + make -j16 run + +If you want more of the standard library, you can use `runruby` instead of `run`. + +### Run Bootstrap Tests + +There are a set of tests in `bootstraptest/` which cover most basic features of the core Ruby language. + + make -j16 test + +### Run Extensive Tests + +There are extensive tests in `test/` which cover a wide range of features of the Ruby core language. + + make -j16 test-all + +You can run specific tests by specifying their path: + + make -j16 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. + + make -j16 test-all test-rubyspec -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/