File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,6 +293,7 @@ typedef unsigned long ID;
293293#define FIX2INT (i ) (((long )i) >> 1 )
294294#define RUBY_METHOD_FUNC (func ) ((VALUE (*)(...))func)
295295
296+ void (*ruby_init_stack)(VALUE *);
296297void (*ruby_sysinit)(int *, const char ***);
297298void (*ruby_init)(void );
298299void (*ruby_init_loadpath)(void );
@@ -337,6 +338,7 @@ static int df_loadruby(void)
337338 // ruby_sysinit is optional (ruby1.9 only)
338339 ruby_sysinit = (decltype (ruby_sysinit))LookupPlugin (libruby_handle, " ruby_sysinit" );
339340#define rbloadsym (s ) if (!(s = (decltype (s))LookupPlugin(libruby_handle, #s))) return 0
341+ rbloadsym (ruby_init_stack);
340342 rbloadsym (ruby_init);
341343 rbloadsym (ruby_init_loadpath);
342344 rbloadsym (ruby_script);
@@ -401,6 +403,10 @@ static void df_rubythread(void *p)
401403{
402404 int state, running;
403405
406+ // may need to be run from df main thread?
407+ VALUE foo;
408+ ruby_init_stack (&foo);
409+
404410 if (ruby_sysinit) {
405411 // ruby1.9 specific API
406412 static int argc;
You can’t perform that action at this time.
0 commit comments