[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mixing C extension classes with ruby classes

snacktime

9/20/2006 12:52:00 AM

I have a C extension that defines a module and two classes in that
module. I was looking at mongrel and mongrel also has a mongrel.rb
file that defines the module and classes that are also defined in the
C extension. However when I define the module in modulename.rb which
also has a C extension that defines the module using rb_define_module,
the definition in modulename.rb takes precedence, and C module/class
definitions disappear.

I can post some code if needed, but maybe it's just something simple I
am missing.

Chris

1 Answer

Nobuyoshi Nakada

9/20/2006 2:28:00 PM

0

Hi,

At Wed, 20 Sep 2006 09:51:34 +0900,
snacktime wrote in [ruby-talk:215221]:
> I have a C extension that defines a module and two classes in that
> module. I was looking at mongrel and mongrel also has a mongrel.rb
> file that defines the module and classes that are also defined in the
> C extension. However when I define the module in modulename.rb which
> also has a C extension that defines the module using rb_define_module,
> the definition in modulename.rb takes precedence, and C module/class
> definitions disappear.

Do you require modulename.so in modulename.rb?

--
Nobu Nakada