Hi, I've coded a Ruby C extension in which some exception classes are
created. However, those classes are not visible in Ruby itself.

This is, if for example I do a "irb":

  irb> require "myexten.so"

Then the exception classes don't exist. But the functions in the C
extension can make use of them, raise them and so.

I create the classes as follows:

void Init_utils() {
  ...
  // Create a exception XDMSURLParsingError.
  class_error = rb_define_class("MyProjectError", rb_eStandardError);
  class_url_parsing_error = rb_define_class("URLParsingError", class_error);
}

Should I do something special to export these classes to Ruby? Of
course a workaround would be creating these classes also in Ruby, but
seems a bit "dirty" :)

Thanks.



-- 
IƱaki Baz Castillo
<ibc / aliax.net>