Skip to content

Commit

Permalink
60220
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins Build Server authored and ci committed Sep 13, 2016
1 parent d6bfc88 commit edd9f37
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 21 deletions.
@@ -1,7 +1,4 @@
parsePragmaLiteral
currentToken isSpecial
ifTrue:
[currentToken value = $( ifTrue: [^self parseLiteralArray]].
currentToken isLiteralArrayToken
ifTrue:
[^currentToken isForByteArray
Expand Down
@@ -1,4 +1,4 @@
testInvalidPragmas
testInvalidPragmaPosition
#(
'foo self. <foo: $a>'
'<foo: $a>'
Expand Down
@@ -0,0 +1,23 @@
testPragmaImplicitLiteralArrayIsInvalid
| pragmaWithExpressionAsArgument pragmaWithLiteralArrayAsArgument pragmaWithStringAsArgument |
"a pragma with arguments that look like code
(3+4) were implicitly converted to a literal array
#(3+4), this is not allowed anymore"
pragmaWithExpressionAsArgument := 'foo
<func: (3+4) res: 7>
^ self'.
self should:[RBParser parseMethod: pragmaWithExpressionAsArgument] raise: Exception.

"an explicit literal array is allowed"
pragmaWithLiteralArrayAsArgument := 'foo
<func: #(3+4) res: 7>
^ self'.
"Should work"
RBParser parseMethod: pragmaWithLiteralArrayAsArgument.

"and of course a string literal"
pragmaWithStringAsArgument := 'foo
<func: ''(3+4)'' res: 7>
^ self'.
"should work"
RBParser parseMethod: pragmaWithStringAsArgument.
@@ -1,7 +1,7 @@
script60219
script60220

^ 'AST-Core-TheIntegrator.462.mcz
AST-Tests-Core-TheIntegrator.119.mcz
^ 'AST-Core-TheIntegrator.464.mcz
AST-Tests-Core-TheIntegrator.121.mcz
Alien-eem.35.mcz
Announcements-Core-TheIntegrator.76.mcz
Announcements-Help-TheIntegrator.12.mcz
Expand Down

This file was deleted.

@@ -0,0 +1,6 @@
update60220
"self new update60220"
self withUpdateLog: '19086 do not allow expressions as pragma arguments
https://pharo.fogbugz.com/f/cases/19086'.
self loadTogether: self script60220 merge: false.
self flushCaches.
@@ -1,6 +1,3 @@
commentForCurrentUpdate
^ '17857 newAnonymousSubclass should works for Metaclass
https://pharo.fogbugz.com/f/cases/17857
19082 The tool to do updates is broken due to space in SystemVersion
https://pharo.fogbugz.com/f/cases/19082'
^ '19086 do not allow expressions as pragma arguments
https://pharo.fogbugz.com/f/cases/19086'

0 comments on commit edd9f37

Please sign in to comment.