Recently, I am reading the ruby hacking Guide (the ruby source code is completely explained, and the ruby hacker has been fully explained.
I saw a team translating on the Internet. Unfortunately, I didn't find any good translation results, so I had to continue reading the original Japanese version.
I learned C from my freshman year. After so many years of learning, I have not actually used C for project development.
You can take a look at Ruby source to find out the details.
1. Download the 1.85 version of SRC from rubyforge and extract the file to the specified directory.
2. Environment preparation: Windows XP (SP2 JP) + cygwin
3. Open the decompressed readme file in the specified directory and run the command according to the steps.
* How to compile and install
This is what you need to do to compile and install Ruby:
1. If./configure does not exist or is older than Configure. In,
Run Autoconf to (re) generate configure.
2. Run./configure, which will generate config. h and makefile.
3. Edit defines. H if you need. Usually this step will not be needed.
4. Remove comment mark (#) before the module names from ext/setup (or
Add module names if not present), if you want to link modules
Statically.
If you don't want to compile non static extension modules
(Probably on ubuntures which does not allow dynamic loading ),
Remove comment mark from the line "# option nodynamic" in
EXT/setup.
5. Run make.
6. Optionally, run 'make test' to check whether the compiled Ruby
Interpreter works well. If you see the message "test succeeded ",
Your Ruby works as it shound (hopefully ).
7. Run 'make install'
You may have to be a Super User to install Ruby.
The compiled file is generated under usr/local.