ruby: use ruby1.9.1 on linux

develop
jj 2012-06-10 01:45:30 +02:00
parent 2aace670ea
commit bc734619b4
1 changed files with 9 additions and 1 deletions

@ -153,6 +153,7 @@ DFhackCExport command_result plugin_onstatechange ( color_ostream &out, state_ch
SCASE(VIEWSCREEN_CHANGED);
SCASE(CORE_INITIALIZED);
SCASE(BEGIN_UNLOAD);
#undef SCASE
}
return plugin_eval_rb(cmd);
@ -252,7 +253,7 @@ static int df_loadruby(void)
#ifdef WIN32
"msvcrt-ruby191.dll";
#else
"libruby1.9.so.1.9.0";
"./libruby-1.9.1.so.1.9.1";
#endif
libruby_handle = OpenPlugin(libpath);
@ -330,6 +331,13 @@ static void df_rubythread(void *p)
{
int state, running;
if (ruby_sysinit) {
// ruby1.9 specific API
static int argc;
static const char *argv[] = { "dfhack", 0 };
ruby_sysinit(&argc, (const char ***)&argv);
}
// initialize the ruby interpreter
ruby_init();
ruby_init_loadpath();