summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-12-18 18:17:33 +1300
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-12-18 19:15:11 +1300
commit75b5a4808fce6e6a11ef43a12c399e4e2eb63e86 (patch)
treee5d9c673bc51cd7e567fe4a7ef3b03442a8faaf1 /doc
parent42d32311541e58503b885b09b469948922650c66 (diff)
Initial hacking guide.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5294
Diffstat (limited to 'doc')
-rw-r--r--doc/hacking.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/hacking.md b/doc/hacking.md
new file mode 100644
index 0000000000..fe77232bd0
--- /dev/null
+++ b/doc/hacking.md
@@ -0,0 +1,51 @@
+# 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