diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 278f270..43d2d24 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -204,13 +204,9 @@ protect_funcall0 (VALUE arg) VALUE rb_protect_funcall (VALUE recv, ID mid, int *state, int argc, VALUE *argv) { - struct protect_call_arg arg; + *state = 0; + return rb_funcall2 (recv, mid, argc, argv); - arg.recv = recv; - arg.mid = mid; - arg.argc = argc; - arg.argv = argv; - return rb_protect (protect_funcall0, (VALUE) &arg, state); } /*