Skip to content

Commit 5287b70

Browse files
committed
Fixed failing tests by using OpalCompiler instead of compiler
1 parent 4144d9d commit 5287b70

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

.project

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
'srcDirectory' : 'src'
3+
}

src/DataFrame-Core/DataFrame.class.st

+14-12
Original file line numberDiff line numberDiff line change
@@ -769,22 +769,24 @@ DataFrame >> select: colNames where: aBlock groupBy: aColName aggregate: selecto
769769

770770
{ #category : #enumerating }
771771
DataFrame >> select: aBlock with: testedColumnNames [
772-
773772
| blockStr |
774773
blockStr := aBlock asString.
775-
774+
776775
"Remove parameters: '[ :x | x > 3 ]' to '[ x > 3 ]'"
777-
blockStr := (blockStr
776+
blockStr := blockStr
778777
copyFrom: (blockStr findString: '|')
779-
to: blockStr size).
780-
781-
testedColumnNames do: [ :eachColName |
782-
blockStr := blockStr
783-
copyReplaceAll: eachColName
784-
with: ('(row atKey: #', eachColName, ')') ].
785-
786-
blockStr := '[ :row ', blockStr.
787-
^ self select: (Compiler evaluate: blockStr)
778+
to: blockStr size.
779+
testedColumnNames
780+
do: [ :eachColName |
781+
blockStr := blockStr
782+
copyReplaceAll: eachColName
783+
with: '(row atKey: #' , eachColName , ')' ].
784+
blockStr := '[ :row ' , blockStr.
785+
^ self
786+
select:
787+
(OpalCompiler new
788+
source: blockStr;
789+
evaluate)
788790
]
789791

790792
{ #category : #queries }

0 commit comments

Comments
 (0)