{"action":"created","issue":{"url":"https://api.github.com/repos/intridea/hashie/issues/320","labels_url":"https://api.github.com/repos/intridea/hashie/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/intridea/hashie/issues/320/comments","events_url":"https://api.github.com/repos/intridea/hashie/issues/320/events","html_url":"https://github.com/intridea/hashie/issues/320","id":113426242,"number":320,"title":"regression in 3.4.3: ArgumentError: The property structurize! clashes with an existing method.","user":{"login":"jrochkind","id":149304,"avatar_url":"https://avatars.githubusercontent.com/u/149304?v=3","gravatar_id":"","url":"https://api.github.com/users/jrochkind","html_url":"https://github.com/jrochkind","followers_url":"https://api.github.com/users/jrochkind/followers","following_url":"https://api.github.com/users/jrochkind/following{/other_user}","gists_url":"https://api.github.com/users/jrochkind/gists{/gist_id}","starred_url":"https://api.github.com/users/jrochkind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrochkind/subscriptions","organizations_url":"https://api.github.com/users/jrochkind/orgs","repos_url":"https://api.github.com/users/jrochkind/repos","events_url":"https://api.github.com/users/jrochkind/events{/privacy}","received_events_url":"https://api.github.com/users/jrochkind/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/intridea/hashie/labels/bug?","name":"bug?","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-26T18:55:43Z","updated_at":"2015-10-27T19:03:59Z","closed_at":"2015-10-26T20:08:09Z","body":"Running tests on my app, now against hashie 3.4.3, I'm getting errors from Hashie::Mash. \r\n\r\n~~~\r\nArgumentError: The property structurize! clashes with an existing method.\r\n    hashie (3.4.3) lib/hashie/extensions/mash/safe_assignment.rb:6:in `custom_writer'\r\n    hashie (3.4.3) lib/hashie/extensions/mash/safe_assignment.rb:11:in `[]='\r\n    hashie (3.4.3) lib/hashie/mash.rb:188:in `assign_property'\r\n    confstruct (1.0.1) lib/confstruct/hash_with_struct_access.rb:144:in `method_missing'\r\n    confstruct (1.0.1) lib/confstruct/hash_with_struct_access.rb:137:in `block in method_missing'\r\n    confstruct (1.0.1) lib/confstruct/hash_with_struct_access.rb:137:in `collect'\r\n    confstruct (1.0.1) lib/confstruct/hash_with_struct_access.rb:137:in `method_missing'\r\n~~~\r\n\r\nI have not yet debugged to figure out what's going on. \r\n\r\nLooking at travis log (thanks travis!), I can see that last time tests were run and passed, it was using hashie 3.4.2.  Running my tests against to make sure tests do pass with no code changes but hashie 3.4.2 instead of 3.4.3...   \r\n\r\nYes, they do. So there is a regression of some kind in 3.4.3. For now I'm going to lock to 3.4.2, but I'll try to find time to create an isolated reproduction. "},"comment":{"url":"https://api.github.com/repos/intridea/hashie/issues/comments/151611531","html_url":"https://github.com/intridea/hashie/issues/320#issuecomment-151611531","issue_url":"https://api.github.com/repos/intridea/hashie/issues/320","id":151611531,"user":{"login":"jrochkind","id":149304,"avatar_url":"https://avatars.githubusercontent.com/u/149304?v=3","gravatar_id":"","url":"https://api.github.com/users/jrochkind","html_url":"https://github.com/jrochkind","followers_url":"https://api.github.com/users/jrochkind/followers","following_url":"https://api.github.com/users/jrochkind/following{/other_user}","gists_url":"https://api.github.com/users/jrochkind/gists{/gist_id}","starred_url":"https://api.github.com/users/jrochkind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrochkind/subscriptions","organizations_url":"https://api.github.com/users/jrochkind/orgs","repos_url":"https://api.github.com/users/jrochkind/repos","events_url":"https://api.github.com/users/jrochkind/events{/privacy}","received_events_url":"https://api.github.com/users/jrochkind/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T19:03:59Z","updated_at":"2015-10-27T19:03:59Z","body":"Ah, okay, looking at the compare: https://github.com/intridea/hashie/commit/add20277a389e97b3f9c0a2005a3d79b967bb4dd\r\n\r\nI think the issue is that SafeAssignment didn't used to protect against conflict with private methods, but now it does. \r\n\r\nIs that an appropriate change for a patch release?  I'm not even entirely sure if it's correct to guard against clashes with private methods or not, I'm not sure if over-riding private methods is really a problem. \r\n\r\nThe SafeAssignment block in the README says:\r\n\r\n> When mixed in, the Mash will raise an ArgumentError if you attempt to write a property with the same name as an existing method.\r\n\r\nWhich, yeah, I guess means it maybe always should have been protecting against private method clash too. \r\n\r\nBut yeah, that was a somewhat big change for a patch release. "}}