{"action":"created","comment":{"url":"https://api.github.com/repos/ktheory/maildir/pulls/comments/24953743","id":24953743,"diff_hunk":"@@ -7,7 +7,7 @@ class << self\n     def counter\n       @counter_mutex ||= Mutex.new\n       @counter_mutex.synchronize do\n-        @counter = @counter.to_i + 1\n+        @counter = (@counter ||=  0) + 1","path":"lib/maildir/unique_name.rb","position":5,"original_position":5,"commit_id":"d18b76915b6d6116edaf7cd6ffeb15e2c81192d4","original_commit_id":"d18b76915b6d6116edaf7cd6ffeb15e2c81192d4","user":{"login":"copiousfreetime","id":11256,"avatar_url":"https://avatars.githubusercontent.com/u/11256?v=3","gravatar_id":"","url":"https://api.github.com/users/copiousfreetime","html_url":"https://github.com/copiousfreetime","followers_url":"https://api.github.com/users/copiousfreetime/followers","following_url":"https://api.github.com/users/copiousfreetime/following{/other_user}","gists_url":"https://api.github.com/users/copiousfreetime/gists{/gist_id}","starred_url":"https://api.github.com/users/copiousfreetime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copiousfreetime/subscriptions","organizations_url":"https://api.github.com/users/copiousfreetime/orgs","repos_url":"https://api.github.com/users/copiousfreetime/repos","events_url":"https://api.github.com/users/copiousfreetime/events{/privacy}","received_events_url":"https://api.github.com/users/copiousfreetime/received_events","type":"User","site_admin":false},"body":"there was a an 'uninitialized variable' warning for `@counter` that's what I was going for.  This is one approach to doing that. ","created_at":"2015-02-18T23:54:32Z","updated_at":"2015-02-18T23:54:32Z","html_url":"https://github.com/ktheory/maildir/pull/18#discussion_r24953743","pull_request_url":"https://api.github.com/repos/ktheory/maildir/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/comments/24953743"},"html":{"href":"https://github.com/ktheory/maildir/pull/18#discussion_r24953743"},"pull_request":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/ktheory/maildir/pulls/18","id":29561398,"html_url":"https://github.com/ktheory/maildir/pull/18","diff_url":"https://github.com/ktheory/maildir/pull/18.diff","patch_url":"https://github.com/ktheory/maildir/pull/18.patch","issue_url":"https://api.github.com/repos/ktheory/maildir/issues/18","number":18,"state":"open","locked":false,"title":"Minus w clean","user":{"login":"copiousfreetime","id":11256,"avatar_url":"https://avatars.githubusercontent.com/u/11256?v=3","gravatar_id":"","url":"https://api.github.com/users/copiousfreetime","html_url":"https://github.com/copiousfreetime","followers_url":"https://api.github.com/users/copiousfreetime/followers","following_url":"https://api.github.com/users/copiousfreetime/following{/other_user}","gists_url":"https://api.github.com/users/copiousfreetime/gists{/gist_id}","starred_url":"https://api.github.com/users/copiousfreetime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copiousfreetime/subscriptions","organizations_url":"https://api.github.com/users/copiousfreetime/orgs","repos_url":"https://api.github.com/users/copiousfreetime/repos","events_url":"https://api.github.com/users/copiousfreetime/events{/privacy}","received_events_url":"https://api.github.com/users/copiousfreetime/received_events","type":"User","site_admin":false},"body":"I'm always a fan of making things `ruby -w` clean. Since I have [code that depends](https://github.com/copiousfreetime/qup/) on maildir  I figure I should help a bit.","created_at":"2015-02-18T20:46:00Z","updated_at":"2015-02-18T23:54:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7964aa167226709a695533e4caafe711a50d610c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ktheory/maildir/pulls/18/commits","review_comments_url":"https://api.github.com/repos/ktheory/maildir/pulls/18/comments","review_comment_url":"https://api.github.com/repos/ktheory/maildir/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ktheory/maildir/issues/18/comments","statuses_url":"https://api.github.com/repos/ktheory/maildir/statuses/d18b76915b6d6116edaf7cd6ffeb15e2c81192d4","head":{"label":"copiousfreetime:minus-w-clean","ref":"minus-w-clean","sha":"d18b76915b6d6116edaf7cd6ffeb15e2c81192d4","user":{"login":"copiousfreetime","id":11256,"avatar_url":"https://avatars.githubusercontent.com/u/11256?v=3","gravatar_id":"","url":"https://api.github.com/users/copiousfreetime","html_url":"https://github.com/copiousfreetime","followers_url":"https://api.github.com/users/copiousfreetime/followers","following_url":"https://api.github.com/users/copiousfreetime/following{/other_user}","gists_url":"https://api.github.com/users/copiousfreetime/gists{/gist_id}","starred_url":"https://api.github.com/users/copiousfreetime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copiousfreetime/subscriptions","organizations_url":"https://api.github.com/users/copiousfreetime/orgs","repos_url":"https://api.github.com/users/copiousfreetime/repos","events_url":"https://api.github.com/users/copiousfreetime/events{/privacy}","received_events_url":"https://api.github.com/users/copiousfreetime/received_events","type":"User","site_admin":false},"repo":{"id":30985770,"name":"maildir","full_name":"copiousfreetime/maildir","owner":{"login":"copiousfreetime","id":11256,"avatar_url":"https://avatars.githubusercontent.com/u/11256?v=3","gravatar_id":"","url":"https://api.github.com/users/copiousfreetime","html_url":"https://github.com/copiousfreetime","followers_url":"https://api.github.com/users/copiousfreetime/followers","following_url":"https://api.github.com/users/copiousfreetime/following{/other_user}","gists_url":"https://api.github.com/users/copiousfreetime/gists{/gist_id}","starred_url":"https://api.github.com/users/copiousfreetime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copiousfreetime/subscriptions","organizations_url":"https://api.github.com/users/copiousfreetime/orgs","repos_url":"https://api.github.com/users/copiousfreetime/repos","events_url":"https://api.github.com/users/copiousfreetime/events{/privacy}","received_events_url":"https://api.github.com/users/copiousfreetime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/copiousfreetime/maildir","description":"A ruby library for reading & writing messages in the maildir format","fork":true,"url":"https://api.github.com/repos/copiousfreetime/maildir","forks_url":"https://api.github.com/repos/copiousfreetime/maildir/forks","keys_url":"https://api.github.com/repos/copiousfreetime/maildir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/copiousfreetime/maildir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/copiousfreetime/maildir/teams","hooks_url":"https://api.github.com/repos/copiousfreetime/maildir/hooks","issue_events_url":"https://api.github.com/repos/copiousfreetime/maildir/issues/events{/number}","events_url":"https://api.github.com/repos/copiousfreetime/maildir/events","assignees_url":"https://api.github.com/repos/copiousfreetime/maildir/assignees{/user}","branches_url":"https://api.github.com/repos/copiousfreetime/maildir/branches{/branch}","tags_url":"https://api.github.com/repos/copiousfreetime/maildir/tags","blobs_url":"https://api.github.com/repos/copiousfreetime/maildir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/copiousfreetime/maildir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/copiousfreetime/maildir/git/refs{/sha}","trees_url":"https://api.github.com/repos/copiousfreetime/maildir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/copiousfreetime/maildir/statuses/{sha}","languages_url":"https://api.github.com/repos/copiousfreetime/maildir/languages","stargazers_url":"https://api.github.com/repos/copiousfreetime/maildir/stargazers","contributors_url":"https://api.github.com/repos/copiousfreetime/maildir/contributors","subscribers_url":"https://api.github.com/repos/copiousfreetime/maildir/subscribers","subscription_url":"https://api.github.com/repos/copiousfreetime/maildir/subscription","commits_url":"https://api.github.com/repos/copiousfreetime/maildir/commits{/sha}","git_commits_url":"https://api.github.com/repos/copiousfreetime/maildir/git/commits{/sha}","comments_url":"https://api.github.com/repos/copiousfreetime/maildir/comments{/number}","issue_comment_url":"https://api.github.com/repos/copiousfreetime/maildir/issues/comments/{number}","contents_url":"https://api.github.com/repos/copiousfreetime/maildir/contents/{+path}","compare_url":"https://api.github.com/repos/copiousfreetime/maildir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/copiousfreetime/maildir/merges","archive_url":"https://api.github.com/repos/copiousfreetime/maildir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/copiousfreetime/maildir/downloads","issues_url":"https://api.github.com/repos/copiousfreetime/maildir/issues{/number}","pulls_url":"https://api.github.com/repos/copiousfreetime/maildir/pulls{/number}","milestones_url":"https://api.github.com/repos/copiousfreetime/maildir/milestones{/number}","notifications_url":"https://api.github.com/repos/copiousfreetime/maildir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/copiousfreetime/maildir/labels{/name}","releases_url":"https://api.github.com/repos/copiousfreetime/maildir/releases{/id}","created_at":"2015-02-18T20:40:39Z","updated_at":"2015-02-18T20:40:39Z","pushed_at":"2015-02-18T20:42:43Z","git_url":"git://github.com/copiousfreetime/maildir.git","ssh_url":"git@github.com:copiousfreetime/maildir.git","clone_url":"https://github.com/copiousfreetime/maildir.git","svn_url":"https://github.com/copiousfreetime/maildir","homepage":"","size":190,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ktheory:master","ref":"master","sha":"3b6a4cb244bd5a7d88b2e96ddec833284f763507","user":{"login":"ktheory","id":975,"avatar_url":"https://avatars.githubusercontent.com/u/975?v=3","gravatar_id":"","url":"https://api.github.com/users/ktheory","html_url":"https://github.com/ktheory","followers_url":"https://api.github.com/users/ktheory/followers","following_url":"https://api.github.com/users/ktheory/following{/other_user}","gists_url":"https://api.github.com/users/ktheory/gists{/gist_id}","starred_url":"https://api.github.com/users/ktheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktheory/subscriptions","organizations_url":"https://api.github.com/users/ktheory/orgs","repos_url":"https://api.github.com/users/ktheory/repos","events_url":"https://api.github.com/users/ktheory/events{/privacy}","received_events_url":"https://api.github.com/users/ktheory/received_events","type":"User","site_admin":false},"repo":{"id":400988,"name":"maildir","full_name":"ktheory/maildir","owner":{"login":"ktheory","id":975,"avatar_url":"https://avatars.githubusercontent.com/u/975?v=3","gravatar_id":"","url":"https://api.github.com/users/ktheory","html_url":"https://github.com/ktheory","followers_url":"https://api.github.com/users/ktheory/followers","following_url":"https://api.github.com/users/ktheory/following{/other_user}","gists_url":"https://api.github.com/users/ktheory/gists{/gist_id}","starred_url":"https://api.github.com/users/ktheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktheory/subscriptions","organizations_url":"https://api.github.com/users/ktheory/orgs","repos_url":"https://api.github.com/users/ktheory/repos","events_url":"https://api.github.com/users/ktheory/events{/privacy}","received_events_url":"https://api.github.com/users/ktheory/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ktheory/maildir","description":"A ruby library for reading & writing messages in the maildir format","fork":false,"url":"https://api.github.com/repos/ktheory/maildir","forks_url":"https://api.github.com/repos/ktheory/maildir/forks","keys_url":"https://api.github.com/repos/ktheory/maildir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ktheory/maildir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ktheory/maildir/teams","hooks_url":"https://api.github.com/repos/ktheory/maildir/hooks","issue_events_url":"https://api.github.com/repos/ktheory/maildir/issues/events{/number}","events_url":"https://api.github.com/repos/ktheory/maildir/events","assignees_url":"https://api.github.com/repos/ktheory/maildir/assignees{/user}","branches_url":"https://api.github.com/repos/ktheory/maildir/branches{/branch}","tags_url":"https://api.github.com/repos/ktheory/maildir/tags","blobs_url":"https://api.github.com/repos/ktheory/maildir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ktheory/maildir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ktheory/maildir/git/refs{/sha}","trees_url":"https://api.github.com/repos/ktheory/maildir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ktheory/maildir/statuses/{sha}","languages_url":"https://api.github.com/repos/ktheory/maildir/languages","stargazers_url":"https://api.github.com/repos/ktheory/maildir/stargazers","contributors_url":"https://api.github.com/repos/ktheory/maildir/contributors","subscribers_url":"https://api.github.com/repos/ktheory/maildir/subscribers","subscription_url":"https://api.github.com/repos/ktheory/maildir/subscription","commits_url":"https://api.github.com/repos/ktheory/maildir/commits{/sha}","git_commits_url":"https://api.github.com/repos/ktheory/maildir/git/commits{/sha}","comments_url":"https://api.github.com/repos/ktheory/maildir/comments{/number}","issue_comment_url":"https://api.github.com/repos/ktheory/maildir/issues/comments/{number}","contents_url":"https://api.github.com/repos/ktheory/maildir/contents/{+path}","compare_url":"https://api.github.com/repos/ktheory/maildir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ktheory/maildir/merges","archive_url":"https://api.github.com/repos/ktheory/maildir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ktheory/maildir/downloads","issues_url":"https://api.github.com/repos/ktheory/maildir/issues{/number}","pulls_url":"https://api.github.com/repos/ktheory/maildir/pulls{/number}","milestones_url":"https://api.github.com/repos/ktheory/maildir/milestones{/number}","notifications_url":"https://api.github.com/repos/ktheory/maildir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ktheory/maildir/labels{/name}","releases_url":"https://api.github.com/repos/ktheory/maildir/releases{/id}","created_at":"2009-12-05T21:38:05Z","updated_at":"2015-02-18T20:40:33Z","pushed_at":"2015-02-03T19:30:10Z","git_url":"git://github.com/ktheory/maildir.git","ssh_url":"git@github.com:ktheory/maildir.git","clone_url":"https://github.com/ktheory/maildir.git","svn_url":"https://github.com/ktheory/maildir","homepage":"","size":268,"stargazers_count":57,"watchers_count":57,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/18"},"html":{"href":"https://github.com/ktheory/maildir/pull/18"},"issue":{"href":"https://api.github.com/repos/ktheory/maildir/issues/18"},"comments":{"href":"https://api.github.com/repos/ktheory/maildir/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ktheory/maildir/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/ktheory/maildir/statuses/d18b76915b6d6116edaf7cd6ffeb15e2c81192d4"}}}}