Skip to content

Commit c74564c

Browse files
nobutmm1
authored andcommitted
insns.def: adjust style
* insns.def (opt_mod, opt_aset_with, opt_aref_with, opt_regexpmatch1): adjust style, do not cuddle else up. git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/trunk@44703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 8f9c7e2 commit c74564c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

insns.def

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,8 @@ opt_mod
15501550
y = FIX2LONG(obj);
15511551
if (x > 0 && y > 0) {
15521552
val = LONG2FIX(x % y);
1553-
} else {
1553+
}
1554+
else {
15541555
/* copied from numeric.c#fixdivmod */
15551556
long div, mod;
15561557

@@ -1914,7 +1915,8 @@ opt_aset_str
19141915
{
19151916
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
19161917
rb_hash_aset(recv, key, val);
1917-
} else {
1918+
}
1919+
else {
19181920
PUSH(recv);
19191921
PUSH(rb_str_resurrect(key));
19201922
PUSH(val);
@@ -1935,7 +1937,8 @@ opt_aref_str
19351937
{
19361938
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
19371939
val = rb_hash_aref(recv, key);
1938-
} else {
1940+
}
1941+
else {
19391942
PUSH(recv);
19401943
PUSH(rb_str_resurrect(key));
19411944
CALL_SIMPLE_METHOD(recv);
@@ -2134,7 +2137,8 @@ opt_regexpmatch1
21342137
{
21352138
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
21362139
val = rb_reg_match(r, obj);
2137-
} else {
2140+
}
2141+
else {
21382142
val = rb_funcall(r, idEqTilde, 1, obj);
21392143
}
21402144
}

0 commit comments

Comments
 (0)