diff options
author | Morgan Haskel <morgan@puppetlabs.com> | 2014-10-09 13:33:06 -0400 |
---|---|---|
committer | Morgan Haskel <morgan@puppetlabs.com> | 2014-10-09 13:33:06 -0400 |
commit | 0c0f7e13cdb407ca57d2808de9e6dc6ace9d856b (patch) | |
tree | 44ecfd905094e549eaed7b25d57c32ef840747c4 /lib/puppet/parser/functions/shuffle.rb | |
parent | 9bbc62d12ab665115b74920cdfbe55205786f328 (diff) | |
parent | 23bc7d51bd3aca0c3a3391bb628a797dc768422a (diff) | |
download | puppet-stdlib-0c0f7e13cdb407ca57d2808de9e6dc6ace9d856b.tar.gz puppet-stdlib-0c0f7e13cdb407ca57d2808de9e6dc6ace9d856b.tar.bz2 |
Merge pull request #262 from tremble/MODULES-707
Modules 707
Diffstat (limited to 'lib/puppet/parser/functions/shuffle.rb')
-rw-r--r-- | lib/puppet/parser/functions/shuffle.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/shuffle.rb b/lib/puppet/parser/functions/shuffle.rb index 18134ab..30c663d 100644 --- a/lib/puppet/parser/functions/shuffle.rb +++ b/lib/puppet/parser/functions/shuffle.rb @@ -12,9 +12,8 @@ Randomizes the order of a string or array elements. "given (#{arguments.size} for 1)") if arguments.size < 1 value = arguments[0] - klass = value.class - unless [Array, String].include?(klass) + unless value.is_a?(Array) || value.is_a?(String) raise(Puppet::ParseError, 'shuffle(): Requires either ' + 'array or string to work with') end |