Mercurial > vim
diff src/if_ruby.c @ 16162:cd5c83115ec6 v8.1.1086
patch 8.1.1086: too many curly braces
commit https://github.com/vim/vim/commit/abab0b0fdd6535969447b03a4fffc1947918cf6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 30 18:47:01 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Mar 2019 19:00:07 +0100 |
parents | 518f44125207 |
children | 366978ec2c03 |
line wrap: on
line diff
--- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -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 st tv = eval_expr((char_u *)StringValuePtr(str), NULL); if (tv == NULL) - { return Qnil; - } result = vim_to_ruby(tv); free_tv(tv);