MRI: Fix mingw build crash when linking with -mwindows
This commit is contained in:
parent
9ac14800da
commit
33c571e691
|
@ -540,6 +540,13 @@ static void showExc(VALUE exc, const BacktraceData &btData)
|
||||||
|
|
||||||
static void mriBindingExecute()
|
static void mriBindingExecute()
|
||||||
{
|
{
|
||||||
|
/* Normally only a ruby executable would do a sysinit,
|
||||||
|
* but not doing it will lead to crashes due to closed
|
||||||
|
* stdio streams on some platforms (eg. Windows) */
|
||||||
|
int argc = 0;
|
||||||
|
char **argv = 0;
|
||||||
|
ruby_sysinit(&argc, &argv);
|
||||||
|
|
||||||
ruby_setup();
|
ruby_setup();
|
||||||
rb_enc_set_default_external(rb_enc_from_encoding(rb_utf8_encoding()));
|
rb_enc_set_default_external(rb_enc_from_encoding(rb_utf8_encoding()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue