patch 8.2.3751: cannot assign a lambda to an option that takes a function
Problem: Cannot assign a lambda to an option that takes a function.
Solution: Automatically convert the lambda to a string. (Yegappan
Lakshmanan, closes #9286)
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 5098468..0d7eaf2 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -875,7 +875,7 @@
char_u *sval;
rb_encoding *enc;
- if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string)
+ if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string)
{
enc = rb_enc_find((char *)sval);
vim_free(sval);
@@ -895,7 +895,7 @@
rb_encoding *enc;
VALUE v;
- if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string)
+ if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string)
{
enc = rb_enc_find((char *)sval);
vim_free(sval);