puppetlabs/puppet — pull request #3257 by AnchorCat (2014-10-30 08:10:11+00:00)
Title: (PUP-3589) Only treat 'ensure' specially if it is a property

Without this patch, any 'ensure' parameter in a type is treated as if
it were a property that needs to be synced. Since "syncing" only makes
sense for a property (which is a special type of parameter), and not a
parameter in general, this causes Ruby to throw undefined method
exceptions if 'ensure' is not a property.

This patch only treats 'ensure' as syncable if it is a property,
allowing native types to use that name for a bare parameter. This is
particularly useful for custom types that exist only to generate
additional resources on the agent, without having any properties of
their own, but which pass on their parameter values to properties of
the generated resources.