From 18f1ee50336a8afceccdcdac36da0dedbd1904bf Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Tue, 3 Oct 2023 15:11:30 -0300 Subject: [PATCH] Remove JRPCSelfContainedBlockHandler and use native alternative --- ...JRPCSelfContainedBlockHandlerTest.class.st | 21 ------------------- .../JsonRPCRequestHandler.class.st | 4 +--- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 source/Stargate-JSON-RPC-Tests/JRPCSelfContainedBlockHandlerTest.class.st diff --git a/source/Stargate-JSON-RPC-Tests/JRPCSelfContainedBlockHandlerTest.class.st b/source/Stargate-JSON-RPC-Tests/JRPCSelfContainedBlockHandlerTest.class.st deleted file mode 100644 index ef2edcd..0000000 --- a/source/Stargate-JSON-RPC-Tests/JRPCSelfContainedBlockHandlerTest.class.st +++ /dev/null @@ -1,21 +0,0 @@ -" -A JRPCSelfContainedBlockHandlerTest is a test class for testing the behavior of JRPCSelfContainedBlockHandler -" -Class { - #name : #JRPCSelfContainedBlockHandlerTest, - #superclass : #TestCase, - #category : #'Stargate-JSON-RPC-Tests' -} - -{ #category : #tests } -JRPCSelfContainedBlockHandlerTest >> testArgumentCountAndArgumentNamesDontMatch [ - - self - should: [ - JRPCSelfContainedBlockHandler forProcedureNamed: 'x' - withArgumentNames: #( ) - evaluating: [ :one | ] - ] - raise: InstanceCreationFailed - withMessageText: 'The number of arguments must be consistent with the block to evaluate' -] diff --git a/source/Stargate-JSON-RPC/JsonRPCRequestHandler.class.st b/source/Stargate-JSON-RPC/JsonRPCRequestHandler.class.st index 953a91c..5110dd2 100644 --- a/source/Stargate-JSON-RPC/JsonRPCRequestHandler.class.st +++ b/source/Stargate-JSON-RPC/JsonRPCRequestHandler.class.st @@ -33,9 +33,7 @@ JsonRPCRequestHandler >> addHandlerNamed: aString evaluating: aBlock [ { #category : #configuring } JsonRPCRequestHandler >> addHandlerNamed: aString withArgumentNames: argumentNames evaluating: aBlock [ - messageProcessor addHandler: ( JRPCSelfContainedBlockHandler forProcedureNamed: aString - withArgumentNames: argumentNames - evaluating: aBlock ) + messageProcessor addHandlerNamed: aString withArgumentsNamed: argumentNames evaluating: aBlock ] { #category : #configuring }