Skip to content

Commit

Permalink
Merge pull request #13567 from MarcusDenker/Commit-Deprecation-Rewrites
Browse files Browse the repository at this point in the history
Commit-Deprecation-Rewrites
  • Loading branch information
MarcusDenker committed Apr 27, 2023
2 parents bf3a07b + 91e2c43 commit 4cf2e36
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
23 changes: 20 additions & 3 deletions src/Collections-Sequenceable-Tests/ArrayTest.class.st
Expand Up @@ -828,13 +828,30 @@ ArrayTest >> testSelfEvaluating [

{ #category : #tests }
ArrayTest >> testSelfEvaluatingComplexCase [

| complexArray restoredArray |
complexArray := {1 . true . false . nil . #a . 'a' . $a . Float pi . Float halfPi . (4 / 5) . Float infinity negated . (1 @ 2) . (0 @ 0 extent: 1 @ 1).
('hola' -> 0) . Object . Object class}.
complexArray := {
1.
true.
false.
nil.
#a.
'a'.
$a.
Float pi.
Float halfPi.
(4 / 5).
Float infinity negated.
(1 @ 2).
(0 @ 0 extent: 1 @ 1).
('hola' -> 0).
Object.
Object class }.
complexArray := complexArray copyWith: complexArray.
self assert: complexArray isSelfEvaluating.

restoredArray := self class evaluate: complexArray printString.
restoredArray := self class compiler evaluate:
complexArray printString.
self assert: restoredArray equals: complexArray
]

Expand Down
2 changes: 1 addition & 1 deletion src/Debugger-Model-Tests/RecompileTest.class.st
Expand Up @@ -9,7 +9,7 @@ RecompileTest >> testRecompileDoIt [

| method node |
method := nil compiler
noPattern: true;
isScripting: true;
compile: '| a | a := 42'.
self settingUpSessionAndProcessAndContextForBlock: [
nil executeMethod: method ].
Expand Down
2 changes: 1 addition & 1 deletion src/EmergencyDebugger/EDDebuggingAPI.class.st
Expand Up @@ -171,7 +171,7 @@ EDDebuggingAPI >> revert: aCompiledMethod to: aChangeRecord [

aCompiledMethod methodClass
compile: aChangeRecord sourceCode
classified: aChangeRecord category
classified: aChangeRecord protocol
withStamp: aChangeRecord stamp
notifying: nil
]
Expand Down
Expand Up @@ -9,7 +9,10 @@ Class {

{ #category : #utilities }
SelfEvaluatingObjectTest >> assertCode: code print: aString [
self assert: (self class evaluate: code) printString equals: aString

self
assert: (self class compiler evaluate: code) printString
equals: aString
]

{ #category : #tests }
Expand Down
3 changes: 1 addition & 2 deletions src/PharoDocComment/PharoDocCommentExpression.class.st
Expand Up @@ -37,12 +37,11 @@ PharoDocCommentExpression >> expressionNode [

{ #category : #accessing }
PharoDocCommentExpression >> expressionNodeReal [

"Force the parsing of the expression node"

^ self methodClass compiler
source: self source;
noPattern: true;
isScripting: true;
receiver: self methodClass;
parse
]
Expand Down

0 comments on commit 4cf2e36

Please sign in to comment.