diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 6c5b50b4d..389100264 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -1029,6 +1029,9 @@ weechat_ruby_unload (t_weechat_plugin *plugin, t_plugin_script *script) "Unloading Ruby script \"%s\"", script->name); + if (script->shutdown_func[0]) + weechat_ruby_exec (plugin, script, script->shutdown_func, "", ""); + if (script->interpreter) rb_gc_unregister_address (script->interpreter); diff --git a/weechat/src/plugins/scripts/ruby/weechat-ruby.c b/weechat/src/plugins/scripts/ruby/weechat-ruby.c index 6c5b50b4d..389100264 100644 --- a/weechat/src/plugins/scripts/ruby/weechat-ruby.c +++ b/weechat/src/plugins/scripts/ruby/weechat-ruby.c @@ -1029,6 +1029,9 @@ weechat_ruby_unload (t_weechat_plugin *plugin, t_plugin_script *script) "Unloading Ruby script \"%s\"", script->name); + if (script->shutdown_func[0]) + weechat_ruby_exec (plugin, script, script->shutdown_func, "", ""); + if (script->interpreter) rb_gc_unregister_address (script->interpreter);