ruby-changes:70306
From: Samuel <ko1@a...>
Date: Sat, 18 Dec 2021 19:11:06 +0900 (JST)
Subject: [ruby-changes:70306] 78c175280b (master): Fix code formatting.
https://git.ruby-lang.org/ruby.git/commit/?id=78c175280b From 78c175280befc8f0078ee037233ce1bb0af80ed6 Mon Sep 17 00:00:00 2001 From: Samuel Williams <samuel.williams@o...> Date: Sat, 18 Dec 2021 21:42:17 +1300 Subject: Fix code formatting. --- doc/hacking.md | 54 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/doc/hacking.md b/doc/hacking.md index 088e7c2acaa..5bbb04b176b 100644 --- a/doc/hacking.md +++ b/doc/hacking.md @@ -8,33 +8,39 @@ This document gives some helpful instructions which should make your experience https://github.com/ruby/ruby/blob/trunk/doc/hacking.md#L8 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: - # On macOS with Fish shell: - export MAKEFLAGS="--jobs "(sysctl -n hw.ncpu) +``` shell +# On macOS with Fish shell: +export MAKEFLAGS="--jobs "(sysctl -n hw.ncpu) - # On macOS with Bash/ZSH shell: - export MAKEFLAGS="--jobs $(sysctl -n hw.ncpu)" +# On macOS with Bash/ZSH shell: +export MAKEFLAGS="--jobs $(sysctl -n hw.ncpu)" - # On Linux with Fish shell: - export MAKEFLAGS="--jobs "(nproc) +# On Linux with Fish shell: +export MAKEFLAGS="--jobs "(nproc) - # On Linux with Bash/ZSH shell: - export MAKEFLAGS="--jobs $(nproc)" +# On Linux with Bash/ZSH shell: +export MAKEFLAGS="--jobs $(nproc)" +``` ## Configure Ruby It's generally advisable to use a build directory. - ./autogen.sh - mkdir build - cd build - ../configure --prefix $HOME/.rubies/ruby-head - make install +``` shell +./autogen.sh +mkdir build +cd build +../configure --prefix $HOME/.rubies/ruby-head +make install +``` ### Without Documentation If you are frequently building Ruby, this will reduce the time it takes to `make install`. - ../configure --disable-install-doc +``` shell +../configure --disable-install-doc +``` ## Running Ruby @@ -42,7 +48,9 @@ If you are frequently building Ruby, this will reduce the time it takes to `make https://github.com/ruby/ruby/blob/trunk/doc/hacking.md#L48 You can create a file in the Ruby source root called `test.rb`. You can build `miniruby` and execute this script: - make run +``` shell +make 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` https://github.com/ruby/ruby/blob/trunk/doc/hacking.md#L58 There are a set of tests in `bootstraptest/` which cover most basic features of the core Ruby language. - make test +``` shell +make test +``` ### Run Extensive Tests There are extensive tests in `test/` which cover a wide range of features of the Ruby core language. - make test-all +``` shell +make test-all +``` You can run specific tests by specifying their path: - make test-all TESTS=../test/fiber/test_io.rb +``` shell +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. - make test-all test-rubyspec +``` shell +make test-all test-rubyspec +``` -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/