From 3d041a0364c06b0c19cbd88fcf037b68138699a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 29 Jun 2024 07:59:06 +0200 Subject: [PATCH] ruby: fix builtin functions not available (issue #2109) --- ChangeLog.adoc | 1 + src/plugins/ruby/weechat-ruby.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 27f868450..e1ddea9f2 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -16,6 +16,7 @@ * python: fix crash on quit with Python 3.12 (issue #2046, issue #2126) * core: fix crash when deleting a bar that has no items (issue #2138) +* ruby: fix builtin functions not available (issue #2109) [[v4.3.3]] == Version 4.3.3 (2024-06-22) diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index 502e3530e..5036f19fb 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -1266,6 +1266,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { int ruby_error, old_ruby_quiet; VALUE err; + char* process_options_argv[] = { "ruby", "-enil", NULL }; char *weechat_ruby_code = { "$stdout = WeechatOutputs\n" "$stderr = WeechatOutputs\n" @@ -1364,6 +1365,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) ruby_init (); + ruby_process_options (2, process_options_argv); + /* redirect stdin and stdout */ ruby_mWeechatOutputs = rb_define_module ("WeechatOutputs"); rb_define_singleton_method (ruby_mWeechatOutputs, "write",