From bc632cb22b827b3eea25c50fb332db032312b7ad Mon Sep 17 00:00:00 2001 From: Michael Rybakin Date: Mon, 18 Mar 2024 13:48:50 +0400 Subject: [PATCH 1/2] =?UTF-8?q?fix=20#1395:=20=D0=B2=D1=8B=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=A0=D0=B5=D1=84=D0=BB=D0=B5=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=BE=D0=B2=20?= =?UTF-8?q?=D1=81=20=D0=B4=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8=D1=87=D0=B5=D1=81?= =?UTF-8?q?=D0=BA=D0=BE=D0=B9=20=D1=81=D0=B8=D0=B3=D0=BD=D0=B0=D1=82=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ScriptEngine.HostedScript/Library/Reflector.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ScriptEngine.HostedScript/Library/Reflector.cs b/src/ScriptEngine.HostedScript/Library/Reflector.cs index 557865d3d..6bcce0eea 100644 --- a/src/ScriptEngine.HostedScript/Library/Reflector.cs +++ b/src/ScriptEngine.HostedScript/Library/Reflector.cs @@ -40,7 +40,10 @@ public IValue CallMethod(IRuntimeContextInstance target, string methodName, Arra var methodIdx = target.FindMethod(methodName); var methInfo = target.GetMethodInfo(methodIdx); - var argsToPass = GetArgsToPass(arguments, methInfo); + var argValues = arguments?.ToArray() ?? Array.Empty(); + // ArrayImpl не может (не должен!) содержать null или NotAValidValue + + var argsToPass = target.DynamicMethodSignatures ? argValues : GetArgsToPass(argValues, methInfo); IValue retValue = ValueFactory.Create(); if (methInfo.IsFunction) @@ -66,11 +69,8 @@ public IValue CallMethod(IRuntimeContextInstance target, string methodName, Arra return retValue; } - private static IValue[] GetArgsToPass(ArrayImpl arguments, MethodInfo methInfo) + private static IValue[] GetArgsToPass(IValue[] argValues, MethodInfo methInfo) { - var argValues = arguments?.ToArray() ?? Array.Empty(); - // ArrayImpl не может (не должен!) содержать null или NotAValidValue - var methArgCount = methInfo.ArgCount; if (argValues.Length > methArgCount) throw RuntimeException.TooManyArgumentsPassed(); From 1ddd39a5883755b2415a77d51a2c05e7c12f5c61 Mon Sep 17 00:00:00 2001 From: EvilBeaver Date: Thu, 28 Mar 2024 20:49:33 +0300 Subject: [PATCH 2/2] version bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8df4161c6..ef83a9b2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { agent none environment { - ReleaseNumber = '1.9.0' + ReleaseNumber = '1.9.1' outputEnc = '65001' }