MRI-Binding: Fix typo and don't set $LOAD_PATH (thanks @cremno)
'$:' and '$LOAD_PATH' point to the same array.
This commit is contained in:
parent
ec16210f8a
commit
262023b088
|
@ -398,17 +398,6 @@ static void showExc(VALUE exc)
|
||||||
showMsg(StringValueCStr(ms));
|
showMsg(StringValueCStr(ms));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Appends if exists, sets if not */
|
|
||||||
static void globalAryAppend(const char *globalName, VALUE ary)
|
|
||||||
{
|
|
||||||
VALUE existing = rb_gv_get(globalName);
|
|
||||||
|
|
||||||
if (NIL_P(existing))
|
|
||||||
rb_gv_set(globalName, ary);
|
|
||||||
else
|
|
||||||
rb_ary_concat(existing, ary);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mriBindingExecute()
|
static void mriBindingExecute()
|
||||||
{
|
{
|
||||||
ruby_setup();
|
ruby_setup();
|
||||||
|
@ -429,8 +418,7 @@ static void mriBindingExecute()
|
||||||
rb_ary_push(lpaths, pathv);
|
rb_ary_push(lpaths, pathv);
|
||||||
}
|
}
|
||||||
|
|
||||||
globalAryAppend("$", lpaths);
|
rb_ary_concat(rb_gv_get(":"), lpaths);
|
||||||
globalAryAppend("LOAD_PATH", lpaths);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RbData rbData;
|
RbData rbData;
|
||||||
|
|
Loading…
Reference in New Issue