Maybe fixing weird menu texts (issue #1631) (#1634)

Co-authored-by: Matthias Koefferlein <matthias@klayout.de>
This commit is contained in:
Matthias Köfferlein 2024-03-09 09:36:08 +01:00 committed by GitHub
parent ef53700baa
commit 408a30164e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 11 deletions

View File

@ -2358,7 +2358,7 @@ RubyInterpreter::load_file (const std::string &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);
int error = 0;

View File

@ -530,10 +530,10 @@ VALUE rba_eval_string_in_context (const char *expr, const char *file, int line,
rb_set_errinfo (Qnil);
if (file) {
rb_set_progname (rb_str_new (file, long (strlen (file))));
ruby_script (file);
} else {
const char *e = "<immediate>";
rb_set_progname (rb_str_new (e, long (strlen (e))));
ruby_script (e);
}
int argc;

View File

@ -147,14 +147,6 @@ inline std::string rb_cstring_from_utf8 (const std::string &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
*