puppetlabs/puppetlabs-java — Issue #12: Undefined Method
Author: adamjreilly
Created: 2011-10-20 14:55:38+00:00
State: open

Might be doing something wrong here, but in trying to apply this manifest straight out of the repo, I got:

```
undefined method `any?' for "^jdk$|^jre$":String at /etc/puppet/modules/java/manifests/init.pp:19 on node...
```

Looking at validate_re shows that it's expecting an Array, b/c of the call to .any?. I was able to fix the issue by wrapping []'s around the strings being passed into validate_re like so:

```
validate_re($distribution, ['^jdk$|^jre$'])
validate_re($version, ['installed|^[._0-9a-zA-Z:-]+$'])
```
Not sure if the fix should be on the validate_re side or the init.pp