From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-08-03T15:55:40+09:00 Subject: Re: How to Load Script from a C Extension? Why call Ruby from the C side? It seems to me to be easier to call your C code from Ruby. Let Ruby drive... See my post: embed or swig? for more info... (OK, I guess if you have to distribute an executable that would be a reason to embed Ruby in your app instead of using Ruby to call your C code) Phil In article , William Djaja Tjokroaminata wrote: >Hi, > >My current temporary solution is to open the Ruby script file in C, get it >line by line with "fgets", and invoke "rb_eval_string" for each line. The >only problem is that it does not work with multi-line Ruby statements. Is >there a better (and easier) solution? > >Regards, > >Bill >============================================================================== >William Djaja Tjokroaminata wrote: >> Hi, > >> Is it possible to load (and execute) a Ruby script from within a C >> extension? From my Ruby code, I can just write > >> ..... >> load 'conf.rb' >> ..... >