1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

fix the possibility to load a perl script even if it doesn't call register() function

This commit is contained in:
Emmanuel Bouthenot
2007-02-17 18:23:50 +00:00
parent aba6e1257d
commit 429167f032
8 changed files with 16 additions and 28 deletions
+1 -3
View File
@@ -2179,13 +2179,11 @@ weechat_ruby_load (t_weechat_plugin *plugin, char *filename)
curModule = rb_define_module(modname);
ruby_current_script_filename = strdup (filename);
ruby_current_script_filename = filename;
ruby_retcode = rb_protect_funcall (curModule, rb_intern("load_eval_file"),
&ruby_error, 1, rb_str_new2(filename));
free (ruby_current_script_filename);
if (ruby_retcode == Qnil) {
err = rb_inspect(rb_gv_get("$!"));
ruby_plugin->print_server (ruby_plugin, "Ruby error: \"%s\"", STR2CSTR(err));