0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1086: too many curly braces

Problem:    Too many curly braces.
Solution:   Remove curly braces where they are not needed. (Hirohito Higashi,
            closes #3982)
This commit is contained in:
Bram Moolenaar
2019-03-30 18:47:01 +01:00
parent bd9bf266fc
commit abab0b0fdd
42 changed files with 26 additions and 189 deletions

View File

@@ -846,9 +846,7 @@ vim_str2rb_enc_str(const char *s)
enc = rb_enc_find((char *)sval);
vim_free(sval);
if (enc)
{
return rb_enc_str_new(s, (long)strlen(s), enc);
}
}
#endif
return rb_str_new2(s);
@@ -1171,9 +1169,7 @@ vim_to_ruby(typval_T *tv)
if (list != NULL)
{
for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
{
rb_ary_push(result, vim_to_ruby(&curr->li_tv));
}
}
}
else if (tv->v_type == VAR_DICT)
@@ -1227,9 +1223,7 @@ vim_evaluate(VALUE self UNUSED, VALUE str)
tv = eval_expr((char_u *)StringValuePtr(str), NULL);
if (tv == NULL)
{
return Qnil;
}
result = vim_to_ruby(tv);
free_tv(tv);