21 lines
491 B
Smalltalk
21 lines
491 B
Smalltalk
Extension { #name : #BlockClosure }
|
|
|
|
{ #category : #'*Brea' }
|
|
BlockClosure class >> fromSton: stonReader [
|
|
^ self compilerClass new
|
|
source: stonReader parseListSingleton;
|
|
evaluate
|
|
]
|
|
|
|
{ #category : #'*Brea' }
|
|
BlockClosure >> stonContainSubObjects [
|
|
^ false
|
|
]
|
|
|
|
{ #category : #'*Brea' }
|
|
BlockClosure >> stonOn: stonWriter [
|
|
self isClean
|
|
ifTrue: [ stonWriter writeObject: self listSingleton: self printString ]
|
|
ifFalse: [ stonWriter error: 'Only clean block can be serialized' ]
|
|
]
|