jenkinsci / groovy-sandbox

(Deprecated) Compile-time transformer to run Groovy code in a restrictive sandbox
MIT License
122 stars 60 forks source link

Keyword IN not supported #24

Closed pedja4 closed 9 years ago

pedja4 commented 9 years ago

KEYWORD_IN is not supported, trying to execute this simple script

def status = "status 1";
def b = status in ["status 1", "status 2", "status 3", "status 4"];

throws exception

java.lang.IllegalArgumentException: 573
at org.kohsuke.groovy.sandbox.impl.Ops.binaryOperatorMethods(Ops.java:29) ~[Ops.class:?]

where 573 is the value of org.codehaus.groovy.syntax.Types.KEYWORD_IN

kohsuke commented 9 years ago

Fixed by pull request #26