{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/5606","repository_url":"https://api.github.com/repos/chef/chef","labels_url":"https://api.github.com/repos/chef/chef/issues/5606/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/5606/comments","events_url":"https://api.github.com/repos/chef/chef/issues/5606/events","html_url":"https://github.com/chef/chef/pull/5606","id":193205428,"number":5606,"title":"Deprecate creating properties whose names are already methods","user":{"login":"adamleff","id":3221128,"avatar_url":"https://avatars.githubusercontent.com/u/3221128?v=3","gravatar_id":"","url":"https://api.github.com/users/adamleff","html_url":"https://github.com/adamleff","followers_url":"https://api.github.com/users/adamleff/followers","following_url":"https://api.github.com/users/adamleff/following{/other_user}","gists_url":"https://api.github.com/users/adamleff/gists{/gist_id}","starred_url":"https://api.github.com/users/adamleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamleff/subscriptions","organizations_url":"https://api.github.com/users/adamleff/orgs","repos_url":"https://api.github.com/users/adamleff/repos","events_url":"https://api.github.com/users/adamleff/events{/privacy}","received_events_url":"https://api.github.com/users/adamleff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-12-02T20:03:05Z","updated_at":"2016-12-03T03:11:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/5606","html_url":"https://github.com/chef/chef/pull/5606","diff_url":"https://github.com/chef/chef/pull/5606.diff","patch_url":"https://github.com/chef/chef/pull/5606.patch"},"body":"When creating a resource, a user can create a property that is the same\nname as an already-existing Ruby method, such as `#hash`. In the case of\nthe `#hash` method, this can cause issues when attempting to adding\nresources to other data structures, such as Arrays or Hashes. In other\nexamples, this could cause unexpected behavior that is incredibly\ndifficult to troubleshoot.\n\nThis change adds a deprecation warning in the case where a user adds\na property to a resource that the resource instance already responds to.\nIf y'all are OK with this approach, I'll be happy to write up the\ndeprecation doc for this for docs.chef.io.\n\nSigned-off-by: Adam Leff <adam@leff.co>"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/264612248","html_url":"https://github.com/chef/chef/pull/5606#issuecomment-264612248","issue_url":"https://api.github.com/repos/chef/chef/issues/5606","id":264612248,"user":{"login":"adamleff","id":3221128,"avatar_url":"https://avatars.githubusercontent.com/u/3221128?v=3","gravatar_id":"","url":"https://api.github.com/users/adamleff","html_url":"https://github.com/adamleff","followers_url":"https://api.github.com/users/adamleff/followers","following_url":"https://api.github.com/users/adamleff/following{/other_user}","gists_url":"https://api.github.com/users/adamleff/gists{/gist_id}","starred_url":"https://api.github.com/users/adamleff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamleff/subscriptions","organizations_url":"https://api.github.com/users/adamleff/orgs","repos_url":"https://api.github.com/users/adamleff/repos","events_url":"https://api.github.com/users/adamleff/events{/privacy}","received_events_url":"https://api.github.com/users/adamleff/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T03:11:50Z","updated_at":"2016-12-03T03:11:50Z","body":"Also, I don't think I realized how lucky I am that I haven't shot myself in the foot before given this shared namespace debacle until I started digging deeper into this area of the codebase. I'd really like to see these depredations added for the not-so-lucky. "}}
{"actor":{"display_login":"adamleff"}}