{"action":"closed","issue":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/536","repository_url":"https://api.github.com/repos/bbatsov/ruby-style-guide","labels_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/536/comments","events_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/536/events","html_url":"https://github.com/bbatsov/ruby-style-guide/issues/536","id":129414343,"number":536,"title":"Style suggestion: Do not allow constant definition below private modifier","user":{"login":"RST-J","id":4967885,"avatar_url":"https://avatars.githubusercontent.com/u/4967885?v=3","gravatar_id":"","url":"https://api.github.com/users/RST-J","html_url":"https://github.com/RST-J","followers_url":"https://api.github.com/users/RST-J/followers","following_url":"https://api.github.com/users/RST-J/following{/other_user}","gists_url":"https://api.github.com/users/RST-J/gists{/gist_id}","starred_url":"https://api.github.com/users/RST-J/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RST-J/subscriptions","organizations_url":"https://api.github.com/users/RST-J/orgs","repos_url":"https://api.github.com/users/RST-J/repos","events_url":"https://api.github.com/users/RST-J/events{/privacy}","received_events_url":"https://api.github.com/users/RST-J/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-01-28T10:45:07Z","updated_at":"2016-09-27T15:06:46Z","closed_at":"2016-09-27T15:06:46Z","body":"I recently found out that Ruby classes cannot have private constants which is counterintuitive to me.\r\nIf I have a class definition like this, unless of course I know about `private` only making following method declarations private, I'd rather consider the constant also private:\r\n```ruby\r\nclass Question\r\n  private\r\n\r\n  ANSWER = 42\r\nend\r\n```\r\n\r\nSo, I'd suggest to declare it bad style if constants are defined below a private or protected modifier. What do you think?"}}
{"actor":{"display_login":"RST-J"}}