From: Shashank Date Date: 2003-06-21T11:59:58+09:00 Subject: Re: reading ruby source "Mauricio Fern�ndez" wrote in message > IMHO the source code is quite understandable, the only complicated > files being regex.c and eval.c (where the actual evaluation of the > AST happens). And eval.c was the first file I tried to read ... no wonder I was overwhelmed. [snip] Well, you have made very good suggestions. > Ruby Core > * dln.c: wraps dlopen or the equiv. function of your platform, not very > interesting > * gc.c: quite easy to follow, of interest only if you want to know how > the GC works internally, but it's just mark & sweep doing "common > sense" things so you can safely skip it. > * st.c: a hash table implementation used internally by Ruby, quite > straightforward > * eval.c: much harder to read as you have to know the node types to > follow it; several functions are essentially a big switch() statement > for a node > * parse.y: this can help you see what different node types correspond > to by having a look at the grammar. > * regex.c: whatever, don't read it :-) This is simply great ! > > Built-in classes > Take the class you like, scroll down to the Init_xxx() function and > locate the C function that implements the method you want to study. No > particular order required. > > You (I :) will sometime want to read eval.c, but it's hard to follow on > first read. > > > Incidentally, when I compiled the 1.8.0 preview 2 on Windows (before > > downloading Andy's one click installer) it generated "minruby.exe" and I > > presume it is the "core" I mentioned earlier. Am I correct ? > > IIRC it's used to process the extconf.rb files in the ext/ subdirectory. Thanks very much. This helps a lot ! -- shanko