public static iObject Send(iObject instance, iObject methodName, params iObject[] arguments) { var methodNameAsSymbol = MethodNameAsSymbol(methodName); var argumentKinds = Enumerable.Range(0, arguments.Length).Select(_ => ArgumentKind.Simple); var callSite = new CallSite(methodNameAsSymbol, Visibility.Private, argumentKinds); return(callSite.Call(instance, arguments)); }
public void TestResultBoxing() { var callSite = new CallSite(new Symbol("to_s")); const int integer = 100; var fixnum = new Fixnum(integer); var stringValue = new String(fixnum.Value.ToString()); Assert.That(callSite.Call(fixnum), Is.EqualTo(stringValue)); }