Skip to content

Commit

Permalink
Maybe fixing weird menu texts (issue #1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koefferlein committed Feb 26, 2024
1 parent 2e4c66a commit 02faf1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/rba/rba/rba.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/rba/rba/rbaUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions src/rba/rba/rbaUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 02faf1f

Please sign in to comment.