Skip to content

Commit 79a10cd

Browse files
authored
Merge pull request #1746 from guillep/removeasStringWithCR
Remove usages of strange string method that should be deprecated
2 parents fe032f7 + 1015dcd commit 79a10cd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Spec2-Core/SpAbstractWidgetPresenter.class.st

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ SpAbstractWidgetPresenter class >> documentExampleCode [
131131
and: [ method selector = self documentExampleCodeSelector ] ]
132132
ifNone: [ ^ nil ].
133133

134-
^ (exampleMethod sourceCode lines
134+
^ ((exampleMethod sourceCode lines
135135
allButFirst "Remove method name"
136136
reject: [ :each | each trimLeft beginsWith: '<' ]) "Remove pragmas"
137-
asStringWithCr
137+
joinUsing: Character cr)
138138
trimmed
139139
]
140140

src/Spec2-Dialogs/SpDialogPresenter.class.st

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ SpDialogPresenter class >> documentExampleCode [
7878
detect: [ :method | method protocolName = #example and: [ method selector = #exampleModal ] ]
7979
ifNone: [ ^ nil ].
8080

81-
^ (exampleMethod sourceCode lines allButFirst reject: [ :each | each trimLeft beginsWith: '<' ]) asStringWithCr trimmed "Remove method name" "Remove pragmas"
81+
^ ((exampleMethod sourceCode lines
82+
"Remove method name"
83+
allButFirst
84+
"Remove pragmas"
85+
reject: [ :each | each trimLeft beginsWith: '<' ])
86+
joinUsing: Character cr)
87+
trimmed
8288
]
8389

8490
{ #category : 'documentation' }

0 commit comments

Comments
 (0)