Calling "Signal" from a C module


#1

If I’m writing a C extension, how would I go about calling “Signal.list”
from
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.

Caleb


#2

“C” == Caleb T. removed_email_address@domain.invalid 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


#3

Thanks a bunch!