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.
9c7f2f44463d1d4890f73e8a8229dd29?d=identicon&s=25 caleb (Guest)
on 2005-12-09 15: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.

956f185be9eac1760a2a54e287c4c844?d=identicon&s=25 decoux (Guest)
on 2005-12-09 15:27
(Received via mailing list)
>>>>> "C" == Caleb Tennis <> 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
9c7f2f44463d1d4890f73e8a8229dd29?d=identicon&s=25 caleb (Guest)
on 2005-12-09 15:31
(Received via mailing list)
Thanks a bunch!
This topic is locked and can not be replied to.