Mercurial > vim
comparison src/if_ruby.c @ 26441:65ab0b035dd8 v8.2.3751
patch 8.2.3751: cannot assign a lambda to an option that takes a function
Commit: https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Dec 6 11:03:55 2021 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Dec 2021 12:15:04 +0100 |
parents | c4298ed56ffa |
children | fccd67ae58c8 |
comparison
equal
deleted
inserted
replaced
26440:f6f5f604c17c | 26441:65ab0b035dd8 |
---|---|
873 #if RUBY_VERSION >= 19 | 873 #if RUBY_VERSION >= 19 |
874 long lval; | 874 long lval; |
875 char_u *sval; | 875 char_u *sval; |
876 rb_encoding *enc; | 876 rb_encoding *enc; |
877 | 877 |
878 if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string) | 878 if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string) |
879 { | 879 { |
880 enc = rb_enc_find((char *)sval); | 880 enc = rb_enc_find((char *)sval); |
881 vim_free(sval); | 881 vim_free(sval); |
882 if (enc) | 882 if (enc) |
883 return rb_enc_str_new(s, (long)strlen(s), enc); | 883 return rb_enc_str_new(s, (long)strlen(s), enc); |
893 long lval; | 893 long lval; |
894 char_u *sval; | 894 char_u *sval; |
895 rb_encoding *enc; | 895 rb_encoding *enc; |
896 VALUE v; | 896 VALUE v; |
897 | 897 |
898 if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string) | 898 if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string) |
899 { | 899 { |
900 enc = rb_enc_find((char *)sval); | 900 enc = rb_enc_find((char *)sval); |
901 vim_free(sval); | 901 vim_free(sval); |
902 if (enc) | 902 if (enc) |
903 { | 903 { |