X Tutup
Skip to content

Commit 4990652

Browse files
author
Johan Brichau
committed
Fix ANSIStrings Slime rule
1 parent bfea7ea commit 4990652

File tree

1 file changed

+4
-3
lines changed
  • repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance

1 file changed

+4
-3
lines changed

repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/initialize.st

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ initialize
1313
replace: '`@string includesSubstring: `@subString'
1414
with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0';
1515
replace: '``@string findTokens: ``@arg' byEvaluating: [ :node |
16-
| argument |
17-
argument := node arguments first.
16+
| argument newNode |
17+
newNode := node copy.
18+
argument := newNode arguments first.
1819
argument isLiteralNode ifTrue: [
1920
argument value isArray
2021
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String withAll: argument value)) ].
2122
argument value isCharacter
2223
ifTrue: [ argument replaceWith: (RBLiteralNode value: (String with: argument value)) ] ].
23-
node
24+
newNode
2425
selector: #subStrings:;
2526
yourself ]

0 commit comments

Comments
 (0)
X Tutup