From: craig duncan Date: 2005-02-14T08:03:41+09:00 Subject: Re: Structuring Ruby extension code Timothy Hunter wrote: > On 2005-02-13 02:37:33 -0500, craig duncan > said: >> craig > > > The module is there to prevent namespace pollution. By defining the Ogg > module you are reserving the Ogg namespace instead of inserting your > classes into the top-level namespace. It's a courtesy to your users. Thanks. I kind of understood this. If there was no C extension involved, the question wouldn't even have occurred to me. But trying to get my brain around how the extension stuff works is fuzzing my brain. There isn't enough of a basic explanation of the fundamentals anywhere, as far as i can tell (except the pickaxe book). > Defining a singleton method called `new' is the old way to define the > `new' class method. In 1.8.0 and later, use the rb_define_alloc_func > function. See the PickaxeII for more information. Thanks for the info. It's a shame the documentation situation is the way that it is. In order to get _any_ documentation for the version i'm running (and coding to), i've got to go buy a (very good, admittedly) book. I already bought the first pickaxe book. Can't i get an upgrade. :-)