ruby-changes:57983
From: Nobuyoshi <ko1@a...>
Date: Fri, 27 Sep 2019 14:06:31 +0900 (JST)
Subject: [ruby-changes:57983] 8d0ff88727 (master): Adjusted spaces [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=8d0ff88727 From 8d0ff887274fdc73415035d652551d1fa0768c7b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 27 Sep 2019 14:06:07 +0900 Subject: Adjusted spaces [ci skip] diff --git a/gc.c b/gc.c index adb86b1..c9f26cc 100644 --- a/gc.c +++ b/gc.c @@ -7838,33 +7838,33 @@ gc_ref_update_method_entry(rb_objspace_t *objspace, rb_method_entry_t *me) https://github.com/ruby/ruby/blob/trunk/gc.c#L7838 if (def) { switch (def->type) { - case VM_METHOD_TYPE_ISEQ: - if (def->body.iseq.iseqptr) { - TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, def->body.iseq.iseqptr); - } - TYPED_UPDATE_IF_MOVED(objspace, rb_cref_t *, def->body.iseq.cref); - break; - case VM_METHOD_TYPE_ATTRSET: - case VM_METHOD_TYPE_IVAR: - UPDATE_IF_MOVED(objspace, def->body.attr.location); - break; - case VM_METHOD_TYPE_BMETHOD: - UPDATE_IF_MOVED(objspace, def->body.bmethod.proc); - break; - case VM_METHOD_TYPE_ALIAS: - TYPED_UPDATE_IF_MOVED(objspace, struct rb_method_entry_struct *, def->body.alias.original_me); - return; - case VM_METHOD_TYPE_REFINED: - TYPED_UPDATE_IF_MOVED(objspace, struct rb_method_entry_struct *, def->body.refined.orig_me); - UPDATE_IF_MOVED(objspace, def->body.refined.owner); - break; - case VM_METHOD_TYPE_CFUNC: - case VM_METHOD_TYPE_ZSUPER: - case VM_METHOD_TYPE_MISSING: - case VM_METHOD_TYPE_OPTIMIZED: - case VM_METHOD_TYPE_UNDEF: - case VM_METHOD_TYPE_NOTIMPLEMENTED: - break; + case VM_METHOD_TYPE_ISEQ: + if (def->body.iseq.iseqptr) { + TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, def->body.iseq.iseqptr); + } + TYPED_UPDATE_IF_MOVED(objspace, rb_cref_t *, def->body.iseq.cref); + break; + case VM_METHOD_TYPE_ATTRSET: + case VM_METHOD_TYPE_IVAR: + UPDATE_IF_MOVED(objspace, def->body.attr.location); + break; + case VM_METHOD_TYPE_BMETHOD: + UPDATE_IF_MOVED(objspace, def->body.bmethod.proc); + break; + case VM_METHOD_TYPE_ALIAS: + TYPED_UPDATE_IF_MOVED(objspace, struct rb_method_entry_struct *, def->body.alias.original_me); + return; + case VM_METHOD_TYPE_REFINED: + TYPED_UPDATE_IF_MOVED(objspace, struct rb_method_entry_struct *, def->body.refined.orig_me); + UPDATE_IF_MOVED(objspace, def->body.refined.owner); + break; + case VM_METHOD_TYPE_CFUNC: + case VM_METHOD_TYPE_ZSUPER: + case VM_METHOD_TYPE_MISSING: + case VM_METHOD_TYPE_OPTIMIZED: + case VM_METHOD_TYPE_UNDEF: + case VM_METHOD_TYPE_NOTIMPLEMENTED: + break; } } } diff --git a/vm_args.c b/vm_args.c index f0bc7a8..3e90e8a 100644 --- a/vm_args.c +++ b/vm_args.c @@ -233,14 +233,14 @@ keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr, int check_only_symbol) https://github.com/ruby/ruby/blob/trunk/vm_args.c#L233 if (!NIL_P(*rest_hash_ptr)) { if (check_only_symbol) { - switch(keyword_hash_symbol_other(*rest_hash_ptr)) { - case KW_HASH_HAS_NO_KEYS: - case KW_HASH_HAS_SYMBOL_KEY: + switch (keyword_hash_symbol_other(*rest_hash_ptr)) { + case KW_HASH_HAS_NO_KEYS: + case KW_HASH_HAS_SYMBOL_KEY: break; - case KW_HASH_HAS_OTHER_KEY: + case KW_HASH_HAS_OTHER_KEY: *kw_hash_ptr = Qnil; return FALSE; - case KW_HASH_HAS_BOTH_KEYS: + case KW_HASH_HAS_BOTH_KEYS: *rest_hash_ptr = rb_hash_dup(*rest_hash_ptr); keyword_hash_split(kw_hash_ptr, rest_hash_ptr); return TRUE; @@ -738,7 +738,8 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co https://github.com/ruby/ruby/blob/trunk/vm_args.c#L738 if (RB_TYPE_P(rest_last, T_HASH) && (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) { kw_flag |= VM_CALL_KW_SPLAT; - } else { + } + else { rest_last = 0; } } diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 85b4e3f..fdcf3d4 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2945,13 +2945,13 @@ vm_yield_with_cfunc(rb_execution_context_t *ec, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2945 blockarg = rb_vm_bh_to_procval(ec, block_handler); frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0); - switch(kw_splat) { - case 1: - frame_flag |= VM_FRAME_FLAG_CFRAME_KW; - break; - case 2: - frame_flag |= VM_FRAME_FLAG_CFRAME_EMPTY_KW; - break; + switch (kw_splat) { + case 1: + frame_flag |= VM_FRAME_FLAG_CFRAME_KW; + break; + case 2: + frame_flag |= VM_FRAME_FLAG_CFRAME_EMPTY_KW; + break; } vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc, -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/