Require gem within c extension

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs