Ruby Hacking Guide

This is the home page of the project to translate into English the Ruby Hacking Guide. The RHG is a book that explains how the ruby interpreter (the official C implementation of the Ruby language) works internally.

To fully understand it, you need a good knowledge of C and Ruby. The original book includes a Ruby tutorial (chapter 1), but it has not been translated yet, and we think there are more important chapters to translate first. So if you have not done it yet, you should read a book like the Pickaxe first.

Please note that this book was based on the source code of ruby 1.7.3 so there are a few small differences to the current version of ruby. However, these differences may make the source code simpler to understand and the Ruby Hacking Guide is a good starting point before looking into the ruby source code. The version of the source code used can be downloaded here:

Many thanks to RubyForge for hosting us and to Minero AOKI for letting us translate his work.

Help us!

This translation is done during our free time, do not expect too much. The book is quite big (more than 500 pages) so we need help to translate it.

People who are good at Ruby, C and Japanese or English are needed. Those good at Japanese (native Japanese speakers are of course welcome) can help translate and those good at English (preferably native speakers) can help correct mistakes, and rewrite badly written parts… Knowing Ruby and C well is really a requirement because it helps avoiding many mistranslations and misinterpretations.

People good at making diagrams would also be helpful because there is quite a lot to redo and translators would rather spend their time translating instead of making diagrams.

So if you want to help us, join the rhg-discussion mailing list and introduce yourself (who you are, your skills, how much free time you have). You can of course just join the mailing list to see what’s going on. And do not hesitate to ask questions!

The preferred way to propose corrections/improvements is to send a patch (attached to the mail, not just in the body of the message) on the mailing list. The patch should be done against the text files in the SVN repository (

The RubyForge project page is

Table of contents

Some chapters are previews. It means they have not been fully reviewed, some diagrams may be missing and some sentences may be a little rough. But it also means they are in open review, so do not hesitate to post suggestions on the mailing list.

Part 1: Objects

Part 2: Syntax analysis

Part 3: Evaluation

Part 4: Around the evaluator

The original work is Copyright © 2002 - 2004 Minero AOKI.
Translated by Vincent ISAMBART and Clifford Escobar CAOILE
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License.