Age | Commit message (Collapse) | Author |
|
The previous commit to uriescape() changed the implementation to use the ruby default escape list for URI.escape(), but did not change the call triggered when uriescape() was called on an array, triggering ruby errors.
|
|
We need to use
unless value.is_a?(String) || value.is_a?(Array)
rather than
klass = value.class
unless [String, Array].include?(klass)
because the klass version enforces type checking which is too strict, and does
not allow us to accept objects wich have extended String (or Array).
For example, generate() function now returns Puppet::Util::Execution::ProcessOutput
which is just a very simple extension of String. While this in it's self was
not intentional (PUP-2306) it is not unreasonable to cope with objects which
extend Strings
|
|
Conform to RFC per comments on: https://github.com/puppetlabs/puppetlabs-stdlib/pull/164
Conflicts:
lib/puppet/parser/functions/uriescape.rb
spec/unit/puppet/parser/functions/uriescape_spec.rb
|
|
|