diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-02 14:49:42 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-02 14:49:42 +0900 |
commit | 92d2476208299b7ca780ecb15010741eebd43349 (patch) | |
tree | d19bfea0866bec7a809cb6527b9c95d8fc815b64 /compile.c | |
parent | b5cf3564471af6e11760bf381251f918cdcd7398 (diff) |
Adjust styles [ci skip]
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -5277,8 +5277,7 @@ static VALUE collect_const_segments(rb_iseq_t *iseq, const NODE *node) { VALUE arr = rb_ary_new(); - for (;;) - { + for (;;) { switch (nd_type(node)) { case NODE_CONST: rb_ary_unshift(arr, ID2SYM(node->nd_vid)); @@ -9042,7 +9041,8 @@ compile_colon2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, ISEQ_BODY(iseq)->ic_size++; ADD_INSN1(ret, node, opt_getconstant_path, segments); RB_OBJ_WRITTEN(iseq, Qundef, segments); - } else { + } + else { /* constant */ DECL_ANCHOR(pref); DECL_ANCHOR(body); @@ -9083,7 +9083,8 @@ compile_colon3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE segments = rb_ary_new_from_args(2, ID2SYM(idNULL), ID2SYM(node->nd_mid)); ADD_INSN1(ret, node, opt_getconstant_path, segments); RB_OBJ_WRITTEN(iseq, Qundef, segments); - } else { + } + else { ADD_INSN1(ret, node, putobject, rb_cObject); ADD_INSN1(ret, node, putobject, Qtrue); ADD_INSN1(ret, node, getconstant, ID2SYM(node->nd_mid)); |