mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
ruby: fix crash with Ruby 2.0: use one array for the last 6 arguments of function config_new_option (bug #31050)
This commit is contained in:
@@ -4354,6 +4354,12 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"", "")
|
||||
----------------------------------------
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[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
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -57,6 +57,16 @@ Ruby
|
||||
|
||||
* E necessario definire 'weechat_init' e chiamare 'register' all'interno
|
||||
* Le funzioni sono chiamate con `Weechat.xxx(arg1, arg2, ...)`
|
||||
// TRANSLATION MISSING
|
||||
* 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
|
||||
^^^
|
||||
|
||||
Reference in New Issue
Block a user