diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-22 19:54:44 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-22 19:54:44 +0100 |
commit | 4fdbb83a079f24a742633fd4d02084911580c19c (patch) | |
tree | 234cc86e6e8ad7b626fa57a6edc1d8d1c5918f45 /doc/en | |
parent | 55e58811b3df451db4f95b1035a39f5659788989 (diff) | |
download | weechat-4fdbb83a079f24a742633fd4d02084911580c19c.zip |
ruby: fix crash with Ruby 2.0: use one array for the last 6 arguments of function config_new_option (bug #31050)
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 5 | ||||
-rw-r--r-- | doc/en/weechat_scripting.en.txt | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index f51d4cd10..03a5a13a0 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -4352,6 +4352,11 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color", "", "") ---------------------------------------- +[NOTE] +In Ruby, the 3 callbacks + data (6 strings) must be given in an array of 6 +strings (due to a Ruby limitation of 15 arguments by function), see the +'WeeChat Scripting Guide' for more info (_fixed in version 0.4.1_). + weechat_config_search_option ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt index e7d4dc04f..32e3859a3 100644 --- a/doc/en/weechat_scripting.en.txt +++ b/doc/en/weechat_scripting.en.txt @@ -56,6 +56,15 @@ Ruby * You have to define 'weechat_init' and call 'register' inside * Functions are called with `Weechat.xxx(arg1, arg2, ...)` +* Due to a limitation of Ruby (15 arguments max by function), the function + `Weechat.config_new_option` receives the callbacks in an array of 6 strings + (3 callbacks + 3 data strings), so a call to this function looks like: + +[source,ruby] +---------------------------------------- +Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, + "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) +---------------------------------------- Lua ^^^ |