Hi,

Attached patch fixes coding style in if_ruby.c.
Please check.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  f298af6fca0ea812b8184ae0f793f3db370eca91

diff --git a/src/if_ruby.c b/src/if_ruby.c
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -734,7 +734,8 @@ vim_str2rb_enc_str(const char *s)
     {
 	enc = rb_enc_find((char *)sval);
 	vim_free(sval);
-	if (enc) {
+	if (enc)
+	{
 	    return rb_enc_str_new(s, strlen(s), enc);
 	}
     }
@@ -776,19 +777,23 @@ void ex_rubydo(exarg_T *eap)
     {
 	if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
 	    return;
-	for (i = eap->line1; i <= eap->line2; i++) {
+	for (i = eap->line1; i <= eap->line2; i++)
+	{
 	    VALUE line;
 
 	    line = vim_str2rb_enc_str((char *)ml_get(i));
 	    rb_lastline_set(line);
 	    eval_enc_string_protect((char *) eap->arg, &state);
-	    if (state) {
+	    if (state)
+	    {
 		error_print(state);
 		break;
 	    }
 	    line = rb_lastline_get();
-	    if (!NIL_P(line)) {
-		if (TYPE(line) != T_STRING) {
+	    if (!NIL_P(line))
+	    {
+		if (TYPE(line) != T_STRING)
+		{
 		    EMSG(_("E265: $_ must be an instance of String"));
 		    return;
 		}
@@ -901,7 +906,8 @@ static void error_print(int state)
 #define TAG_FATAL	0x8
 #define TAG_MASK	0xf
 
-    switch (state) {
+    switch (state)
+    {
     case TAG_RETURN:
 	EMSG(_("E267: unexpected return"));
 	break;
@@ -926,10 +932,12 @@ static void error_print(int state)
 	eclass = CLASS_OF(ruby_errinfo);
 	einfo = rb_obj_as_string(ruby_errinfo);
 #endif
-	if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) {
+	if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
+	{
 	    EMSG(_("E272: unhandled exception"));
 	}
-	else {
+	else
+	{
 	    VALUE epath;
 	    char *p;
 
@@ -1211,7 +1219,8 @@ static VALUE set_buffer_line(buf_T *buf,
 	/* set curwin/curbuf for "buf" and save some things */
 	aucmd_prepbuf(&aco, buf);
 
-	if (u_savesub(n) == OK) {
+	if (u_savesub(n) == OK)
+	{
 	    ml_replace(n, (char_u *)line, TRUE);
 	    changed();
 #ifdef SYNTAX_HL
@@ -1252,7 +1261,8 @@ static VALUE buffer_delete(VALUE self, V
 	/* set curwin/curbuf for "buf" and save some things */
 	aucmd_prepbuf(&aco, buf);
 
-	if (u_savedel(n, 1) == OK) {
+	if (u_savedel(n, 1) == OK)
+	{
 	    ml_delete(n, 0);
 
 	    /* Changes to non-active buffers should properly refresh
@@ -1291,7 +1301,8 @@ static VALUE buffer_append(VALUE self, V
 	/* set curwin/curbuf for "buf" and save some things */
 	aucmd_prepbuf(&aco, buf);
 
-	if (u_inssub(n + 1) == OK) {
+	if (u_inssub(n + 1) == OK)
+	{
 	    ml_append(n, (char_u *) line, (colnr_T) 0, FALSE);
 
 	    /*  Changes to non-active buffers should properly refresh screen
@@ -1497,7 +1508,8 @@ static VALUE f_p(int argc, VALUE *argv, 
     int i;
     VALUE str = rb_str_new("", 0);
 
-    for (i = 0; i < argc; i++) {
+    for (i = 0; i < argc; i++)
+    {
 	if (i > 0) rb_str_cat(str, ", ", 2);
 	rb_str_concat(str, rb_inspect(argv[i]));
     }

Raspunde prin e-mail lui