From: Tim Hunter Date: 2008-06-02T05:38:04+09:00 Subject: Re: tech writer seeks to build portfolio with a ruby project Michael Litchard wrote: > Okay, I've decided I want to see what I can do with Ruby's STDLIB. > I wanted to poke around the gdbm source, but for the life of me could not > find it. From what I can understand it's part of the core distribution, but > I can't find a way to get it. > The best I've been able to do so far is find binaries via netbsd's pkgsrc. > > I may decide not to do gdbm first. But what I do want to come away with, is > the right way to > find any given source I need. Download and unroll the source tarball. The builtin classes are defined in the top-level directory in source files that are very clearly named. That is, the String library is in string.c, Hash is in hash.c, etc. Ruby-code libraries (i.e. ostruct) are in the lib subdirectory. The 'gdbm' library is a C extension, so we go look in the ext subdirectory, where we find a directory named gdbm. In ext/gdbm there is gdbm.c. Voila! -- RMagick: http://rmagick.rubyforge.org/ RMagick 2: http://rmagick.rubyforge.org/rmagick2.html