summaryrefslogtreecommitdiff
path: root/lib/chef/guard_interpreter
diff options
context:
space:
mode:
authorAdam Leff <adam@leff.co>2016-12-02 14:51:56 -0500
committerThom May <thom@chef.io>2017-01-18 11:22:10 +0000
commit5ece8327c9d67fa13ca00cce5749a960c643b247 (patch)
tree3f1949e491b0689cead2e17a00e6f0529842445d /lib/chef/guard_interpreter
parenta70905ea932e1a5678c910c8495a344b3b0930e0 (diff)
downloadchef-5ece8327c9d67fa13ca00cce5749a960c643b247.tar.gz
Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-names
When creating a resource, a user can create a property that is the same name as an already-existing Ruby method, such as `#hash`. In the case of the `#hash` method, this can cause issues when attempting to adding resources to other data structures, such as Arrays or Hashes. In other examples, this could cause unexpected behavior that is incredibly difficult to troubleshoot. This change adds a deprecation warning in the case where a user adds a property to a resource that the resource instance already responds to. If y'all are OK with this approach, I'll be happy to write up the deprecation doc for this for docs.chef.io. Signed-off-by: Adam Leff <adam@leff.co>
Diffstat (limited to 'lib/chef/guard_interpreter')
0 files changed, 0 insertions, 0 deletions