Forum: Ruby Calling "Signal" from a C module

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
caleb (Guest)
on 2005-12-09 16:23
(Received via mailing list)
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.

decoux (Guest)
on 2005-12-09 16:27
(Received via mailing list)
>>>>> "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
caleb (Guest)
on 2005-12-09 16:31
(Received via mailing list)
Thanks a bunch!
This topic is locked and can not be replied to.