Here is another one i can't find in the book or online:

How do I call a global function  (which resides in a script) from C.

<script>
def script_main( args )
	puts "something"
end
</script>

<cpp>
ruby_init();
ruby_script("embedded");

init_my_ruby_stuff();

rb_load_file( "test.rb" )
ID id = rb_intern( "script_main" );
rb_funcall( rb_cObject, id, 0 );

ruby_finalize();

return 0;
<cpp/>

But this crashes with an access violation when I run it... am I doing 
something wrong?

~S