From: Dave Thomas Date: 2000-08-16T17:32:29-05:00 Subject: [ruby-talk:04481] Invoking an extension after compilation I want to write a C extension module which runs automatically after a source file has been read, but before it executes. I tried putting the following in the Init_ function: code = NEW_CALL(NEW_CONST(rb_intern("Stuff")), rb_intern("doIt"), 0); ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, code); However, this didn't work, because require_libraries in ruby.c saves and restores the value in ruby_eval_tree_begin. Is there another way to have my code run automatically? Thanks Dave