From: Ryan Davis Date: 2007-01-28T10:48:30+09:00 Subject: Re: Ruby extension (C++) on OS X and Google-Sketchup [ruby 1 On Jan 27, 2007, at 12:52 PM, Suraj Kurapati wrote: > Nicholas wrote: >> I have written a ruby extension in C++ and it works fine on OS X >> Tiger which ships ruby-1.8.2. > > I'm surprised that it actually works in 1.8.2... Why? Nothing has fundamentally changed since 1.8.2. His code sample should work in 1.6 just fine as well. >> cRCL = rb_define_class("rcl", rb_cObject); <=== /CRASH > > Why are you defining a class whose name is not capitalized? That has nothing to do with why he's crashing. > Ruby doesn't let you do this from Ruby code: > > $ irb > class rcl > end > SyntaxError: compile error > (irb):1: class/module name must be CONSTANT > from (irb):2 % ruby -e 'names = []; ObjectSpace.each_object(Module) { |o| names << o.name if o.name =~ /^[a-z]/ }; p names' ["fatal"]