summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-11 13:58:23 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-11 13:58:23 -0500
commit14594d81891b0bdf9aa03f72b88d6939eee59f02 (patch)
tree085b150df91dc23e0efad5bbb6ce15fbfac88536
parentef7a60860d18e9be343b6fa5fe8d76fd080cead0 (diff)
downloadtdebindings-14594d81891b0bdf9aa03f72b88d6939eee59f02.tar.gz
tdebindings-14594d81891b0bdf9aa03f72b88d6939eee59f02.zip
Fix FTBFS on ruby 1.8.x
-rw-r--r--korundum/bin/krubyinit.cpp9
-rw-r--r--qtruby/bin/qtrubyinit.cpp9
2 files changed, 14 insertions, 4 deletions
diff --git a/korundum/bin/krubyinit.cpp b/korundum/bin/krubyinit.cpp
index f53f8306..12b0f6e0 100644
--- a/korundum/bin/krubyinit.cpp
+++ b/korundum/bin/krubyinit.cpp
@@ -25,13 +25,18 @@
* *
***************************************************************************/
-// this name can be used to allow apps
+// this name can be used to allow apps
// to detect what they were started with
static const char* script_name = "krubyinit_app";
int main(int argc, char **argv) {
ruby_init();
ruby_script((char*)script_name);
- void* node = ruby_options(argc, argv);
+#ifdef HAVE_RUBY_1_9
+ void* node = ruby_options(argc, argv);
ruby_run_node(node);
+#else // HAVE_RUBY_1_9
+ ruby_options(argc, argv);
+ ruby_run();
+#endif // HAVE_RUBY_1_9
}
diff --git a/qtruby/bin/qtrubyinit.cpp b/qtruby/bin/qtrubyinit.cpp
index 65c00c40..c9569d9f 100644
--- a/qtruby/bin/qtrubyinit.cpp
+++ b/qtruby/bin/qtrubyinit.cpp
@@ -25,13 +25,18 @@ qrubyinit - makes use of tdeinit_wrapper possible for ruby programs
* *
***************************************************************************/
-// this name can be used to allow apps
+// this name can be used to allow apps
// to detect what they were started with
static const char* script_name = "qrubyinit_app";
int main(int argc, char **argv) {
ruby_init();
ruby_script((char*)script_name);
- void* node = ruby_options(argc, argv);
+#ifdef HAVE_RUBY_1_9
+ void* node = ruby_options(argc, argv);
ruby_run_node(node);
+#else // HAVE_RUBY_1_9
+ ruby_options(argc, argv);
+ ruby_run();
+#endif // HAVE_RUBY_1_9
}