Forum: Ruby require gem within c extension

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dave L. (Guest)
on 2006-04-08 00:13
(Received via mailing list)
Hi,

I have an Init_extension() function which includes the following line:

rb_funcall(rb_mKernel, rb_intern("require"), 1,
rb_str_new2("arrayfields"));

The reason for not using rb_require() in this case is because it's not
gem aware.  The problem I'm experiencing is that execution is
returning from Init_extension() upon trying to call require in this
way.  The code after this rb_funcall() invocation is not being
executed.

I figured I'd ask here before having to dissect the call sequence from
rb_funcall().

thanks,
Dave
This topic is locked and can not be replied to.