summaryrefslogtreecommitdiffstats
path: root/korundum/bin/krubyinit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korundum/bin/krubyinit.cpp')
-rw-r--r--korundum/bin/krubyinit.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/korundum/bin/krubyinit.cpp b/korundum/bin/krubyinit.cpp
index 7ed0b0a4..f53f8306 100644
--- a/korundum/bin/krubyinit.cpp
+++ b/korundum/bin/krubyinit.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
+
/***************************************************************************
krubyinit - makes use of tdeinit_wrapper possible for ruby programs
-------------------
@@ -24,6 +32,6 @@ static const char* script_name = "krubyinit_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);
}