Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/puppet/functions/merge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
# @return
# The merged hash
dispatch :merge2hashes do
repeated_param 'Variant[Hash, Undef, String[0,0]]', :args # this strange type is backwards compatible
return_type 'Hash'
repeated_param 'Variant[Hash[Scalar,Any], Undef, String[0,0]]', :args # this strange type is backwards compatible
return_type 'Hash[Scalar,Any]'
end

# @param args
Expand Down
2 changes: 1 addition & 1 deletion spec/functions/merge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.with_params({}, 'two') \
.and_raise_error(
ArgumentError, \
Regexp.new(Regexp.escape("rejected: parameter 'args' expects a value of type Undef, Hash, or String[0, 0], got String")),
Regexp.new(Regexp.escape("rejected: parameter 'args' expects a value of type Undef, Hash[Scalar, Any], or String[0, 0], got String")),
)
}
it {
Expand Down