ruby-changes:61462
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 3 Jun 2020 16:14:12 +0900 (JST)
Subject: [ruby-changes:61462] 6302b96368 (master): vm_insnhelper.c: add space [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=6302b96368 From 6302b963681e810287b63b0c29adc4718bfe9c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Thu, 28 May 2020 12:41:48 +0900 Subject: vm_insnhelper.c: add space [ci skip] Just cosmetic change to improve readability. diff --git a/vm_insnhelper.c b/vm_insnhelper.c index a60ac2e..22ed42d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2679,6 +2679,7 @@ vm_call_symbol( https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2679 { ASSUME(calling->argc >= 0); /* Also assumes CALLER_SETUP_ARG is already done. */ + enum method_missing_reason missing_reason = MISSING_NOENTRY; int argc = calling->argc; VALUE recv = calling->recv; @@ -2687,10 +2688,12 @@ vm_call_symbol( https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2688 int flags = VM_CALL_FCALL | VM_CALL_OPT_SEND | (calling->kw_splat ? VM_CALL_KW_SPLAT : 0); + if (UNLIKELY(! mid)) { mid = idMethodMissing; missing_reason = ci_missing_reason(ci); ec->method_missing_reason = missing_reason; + /* E.g. when argc == 2 * * | | | | TOPN @@ -2708,6 +2711,7 @@ vm_call_symbol( https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2711 INC_SP(1); MEMMOVE(&TOPN(i - 1), &TOPN(i), VALUE, i); argc = ++calling->argc; + if (rb_method_basic_definition_p(klass, idMethodMissing)) { /* Inadvertent symbol creation shall be forbidden, see [Feature #5112] */ TOPN(i) = symbol; @@ -2715,12 +2719,14 @@ vm_call_symbol( https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2719 const VALUE *argv = STACK_ADDR_FROM_TOP(argc); VALUE exc = rb_make_no_method_exception( rb_eNoMethodError, 0, recv, argc, argv, priv); + rb_exc_raise(exc); } else { TOPN(i) = rb_str_intern(symbol); } } + return vm_call_method(ec, reg_cfp, calling, &(struct rb_call_data) { .ci = vm_ci_new_runtime(mid, flags, argc, vm_ci_kwarg(ci)), .cc = &(struct rb_callcache) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/