diff options
Diffstat (limited to 'qtruby/bin/qtrubyinit.cpp')
-rw-r--r-- | qtruby/bin/qtrubyinit.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qtruby/bin/qtrubyinit.cpp b/qtruby/bin/qtrubyinit.cpp index 2451e002..b17cb940 100644 --- a/qtruby/bin/qtrubyinit.cpp +++ b/qtruby/bin/qtrubyinit.cpp @@ -1,5 +1,13 @@ #include <ruby.h> +#include "config.h" + +#ifndef HAVE_RUBY_1_9 +#define RARRAY_LEN(x) (RARRAY(x)->len) +#define RSTRING_LEN(x) (RSTRING(x)->len) +#define rb_str_catf_1 rb_str_catf +#endif + /*************************************************************************** qrubyinit - makes use of kdeinit_wrapper possible for ruby programs ------------------- @@ -24,6 +32,6 @@ static const char* script_name = "qrubyinit_app"; int main(int argc, char **argv) { ruby_init(); ruby_script((char*)script_name); - ruby_options(argc, argv); - ruby_run(); + void* node = ruby_options(argc, argv); + ruby_run_node(node); } |