summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/ruby/weechat-ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scripts/ruby/weechat-ruby.c')
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index 9ac4a237b..c685fbc46 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -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));