mirror of https://github.com/KLayout/klayout.git
Maybe fixing weird menu texts (issue #1631)
This commit is contained in:
parent
2e4c66ab9f
commit
02faf1f43a
|
|
@ -2358,7 +2358,7 @@ RubyInterpreter::load_file (const std::string &filename_utf8)
|
||||||
{
|
{
|
||||||
std::string fl (rb_cstring_from_utf8 (filename_utf8));
|
std::string fl (rb_cstring_from_utf8 (filename_utf8));
|
||||||
|
|
||||||
rb_set_progname (rb_str_new (fl.c_str (), long (fl.size ())));
|
ruby_script (fl.c_str ());
|
||||||
|
|
||||||
rb_set_errinfo (Qnil);
|
rb_set_errinfo (Qnil);
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
|
||||||
|
|
@ -530,10 +530,10 @@ VALUE rba_eval_string_in_context (const char *expr, const char *file, int line,
|
||||||
rb_set_errinfo (Qnil);
|
rb_set_errinfo (Qnil);
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
rb_set_progname (rb_str_new (file, long (strlen (file))));
|
ruby_script (file);
|
||||||
} else {
|
} else {
|
||||||
const char *e = "<immediate>";
|
const char *e = "<immediate>";
|
||||||
rb_set_progname (rb_str_new (e, long (strlen (e))));
|
ruby_script (e);
|
||||||
}
|
}
|
||||||
|
|
||||||
int argc;
|
int argc;
|
||||||
|
|
|
||||||
|
|
@ -147,14 +147,6 @@ inline std::string rb_cstring_from_utf8 (const std::string &utf8)
|
||||||
return utf8;
|
return utf8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief A setter for $0
|
|
||||||
*/
|
|
||||||
inline void rb_set_progname (VALUE pn)
|
|
||||||
{
|
|
||||||
rb_gv_set ("PROGRAM_NAME", pn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets up a block for protected evaluation
|
* @brief Sets up a block for protected evaluation
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue