From: Asher Date: 2010-08-22T07:57:37+09:00 Subject: [ruby-core:31816] Re: [Feature #3731] Easier Embedding API for Ruby What is difficult about this? Example: #include int main( int argc __attribute__((unused)), char *argv[] __attribute__((unused)) ) { ruby_init(); // Ruby Options are just like /usr/bin/ruby // interpreter name, script name, argv ... char* options[] = { "", "rpdom_test.rb", }; void* node = ruby_options( 2, options ); return ruby_run_node( node ); } Struck me as potentially a documentation issue, but the actual functionality I think is pretty straightforward? Asher On Aug 21, 2010, at 6:18 PM, Beoran Aegul wrote: > Feature #3731: Easier Embedding API for Ruby > http://redmine.ruby-lang.org/issues/show/3731 > > Author: Beoran Aegul > Status: Open, Priority: Normal > > With Ruby 1.9, it has become more difficult to embed Ruby in a C application correctly. > It would be nice if there was a clearly documented and simple C API to embed ruby in C programs. > I know Ruby was not designed from the start to be embedded, but Ruby was used before in several > products as an embedded scripting langauge. It should therefore be possible to do so in a > more straightforward way. > > Kind Regards, > > B. > > > ---------------------------------------- > http://redmine.ruby-lang.org >