Calling "Signal" from a C module

If I’m writing a C extension, how would I go about calling “Signal.list”
within that extension?

I would normally do something like this:

rb_funcall(rb_mSignal, rb_intern(“list”), 0);

But there doesn’t seem to be an rb_mSignal object available.


“C” == Caleb T. [email protected] writes:

C> rb_funcall(rb_mSignal, rb_intern(“list”), 0);

VALUE xx_mSignal;

xx_mSignal = rb_const_get(rb_cObject, rb_intern(“Signal”));

/* … */

rb_funcall(xx_mSignal, rb_intern(“list”), 0);

Guy Decoux

Thanks a bunch!

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