mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 06:16:40 +02:00
ruby: fix builtin functions not available (issue #2109)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user