summaryrefslogtreecommitdiffstats
path: root/src/if_ruby.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-30 18:47:01 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-30 18:47:01 +0100
commitabab0b0fdd6535969447b03a4fffc1947918cf6c (patch)
tree2d43537a5dce8433ef2b2a37684c9e069392c592 /src/if_ruby.c
parentbd9bf266fccbf7b7f09e476e09b61f0133e914db (diff)
patch 8.1.1086: too many curly bracesv8.1.1086
Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes #3982)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r--src/if_ruby.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 63294f4e5e..2727524f89 100644
--- 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 str)
tv = eval_expr((char_u *)StringValuePtr(str), NULL);
if (tv == NULL)
- {
return Qnil;
- }
result = vim_to_ruby(tv);
free_tv(tv);