From 09841d976e11c1136700f086a4303b0f452f6701 Mon Sep 17 00:00:00 2001 From: Wolfgang Lux Date: Mon, 25 Mar 2019 10:54:17 +0100 Subject: [PATCH] Report unimplemented script methods rather than returning nil --- Languages/Smalltalk/ChangeLog | 14 ++++++++++---- Languages/Smalltalk/STSmalltalkScriptObject.m | 8 +++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Languages/Smalltalk/ChangeLog b/Languages/Smalltalk/ChangeLog index 0523332..3bccfe3 100644 --- a/Languages/Smalltalk/ChangeLog +++ b/Languages/Smalltalk/ChangeLog @@ -1,9 +1,15 @@ +2019-03-25 Wolfgang Lux + + * STSmalltalkScriptObject.m (forwardInvocation:): + Call super class implementation for unimplemented methods so that they + get reported as unimplemented rather than silently returning nil. + 2019-02-22 Wolfgang Lux - * GNUmakefile: - * NSDictionary+additions.h: - * NSDictionary+additions.m: - Implement Smalltalk collection protocol methods for NSDictionary. + * GNUmakefile: + * NSDictionary+additions.h: + * NSDictionary+additions.m: + Implement Smalltalk collection protocol methods for NSDictionary. 2017-12-27 Wolfgang Lux diff --git a/Languages/Smalltalk/STSmalltalkScriptObject.m b/Languages/Smalltalk/STSmalltalkScriptObject.m index e1bb109..a436186 100644 --- a/Languages/Smalltalk/STSmalltalkScriptObject.m +++ b/Languages/Smalltalk/STSmalltalkScriptObject.m @@ -170,7 +170,13 @@ } method = [script methodWithName:methodName]; - + if (method == nil) + { + [pool release]; + [super forwardInvocation:invocation]; + return; + } + count = [[invocation methodSignature] numberOfArguments]; NSDebugLLog(@"STSending",