{"action":"created","comment":{"url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/comments/46708751","id":46708751,"diff_hunk":"@@ -12,22 +12,32 @@ def sys(cmd)\n   ret\n end\n \n+# grab config options\n+config_options = []\n+config_options << '--disable-valgrind' unless (with_config('valgrind') == false)\n+\n # monfigure and copy sources to cur_dir\n src_dir = File.expand_path(File.dirname(__FILE__))\n cur_dir = Dir.pwd\n Dir.chdir File.dirname(__FILE__) do\n   # cleanup\n-  FileUtils.remove_dir(pkg, force = true)\n+  FileUtils.remove_dir(pkg, true)\n \n   # decompress and copy source files\n   sys \"tar vjxf #{pkg}.tar.bz2\"\n   Dir.chdir(pkg) do\n     # configure\n-    sys \"./configure\"\n+    sys \"./configure #{ config_options.join(' ') }\"\n     # zone.c is only for Mac OS X\n     if RbConfig::CONFIG['target_vendor'] != \"apple\"\n       sys \"rm -fR src/zone.c\"\n     end\n+    # if we don't remove this explicitly, mkmf will try to include it\n+    # and that causes issues when '--disable-valgrind' is used\n+    # le sigh\n+    unless with_config('valgrind') == false\n+      sys \"rm -fR src/valgrind.c\"","path":"ext/jemalloc/extconf.rb","position":39,"original_position":39,"commit_id":"2d8f93ee89a5c4afb1e8fe66cf4ad9cda0fe8f62","original_commit_id":"2d8f93ee89a5c4afb1e8fe66cf4ad9cda0fe8f62","user":{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false},"body":"you can see above that `rm` is used in the `extconf.rb` already, so I just stuck with the convention.","created_at":"2015-12-04T17:39:40Z","updated_at":"2015-12-04T17:39:40Z","html_url":"https://github.com/kzk/jemalloc-rb/pull/7#discussion_r46708751","pull_request_url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/comments/46708751"},"html":{"href":"https://github.com/kzk/jemalloc-rb/pull/7#discussion_r46708751"},"pull_request":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7","id":52678138,"html_url":"https://github.com/kzk/jemalloc-rb/pull/7","diff_url":"https://github.com/kzk/jemalloc-rb/pull/7.diff","patch_url":"https://github.com/kzk/jemalloc-rb/pull/7.patch","issue_url":"https://api.github.com/repos/kzk/jemalloc-rb/issues/7","number":7,"state":"open","locked":false,"title":"Updated jemalloc to 4.0.4","user":{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false},"body":"This includes support for --with-valgrind as Valgrind is disabled by default.\r\n\r\nMany many thanks to @andremedeiros for helping make this happen!","created_at":"2015-12-04T14:54:56Z","updated_at":"2015-12-04T17:39:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4625c5af94115dae2c4ee2870abe2510d50e1fa2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7/commits","review_comments_url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7/comments","review_comment_url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kzk/jemalloc-rb/issues/7/comments","statuses_url":"https://api.github.com/repos/kzk/jemalloc-rb/statuses/2d8f93ee89a5c4afb1e8fe66cf4ad9cda0fe8f62","head":{"label":"joshk:master","ref":"master","sha":"2d8f93ee89a5c4afb1e8fe66cf4ad9cda0fe8f62","user":{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false},"repo":{"id":41377137,"name":"jemalloc-rb","full_name":"joshk/jemalloc-rb","owner":{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshk/jemalloc-rb","description":"gem install jemalloc && bundle exec je ./script/rails s","fork":true,"url":"https://api.github.com/repos/joshk/jemalloc-rb","forks_url":"https://api.github.com/repos/joshk/jemalloc-rb/forks","keys_url":"https://api.github.com/repos/joshk/jemalloc-rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshk/jemalloc-rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshk/jemalloc-rb/teams","hooks_url":"https://api.github.com/repos/joshk/jemalloc-rb/hooks","issue_events_url":"https://api.github.com/repos/joshk/jemalloc-rb/issues/events{/number}","events_url":"https://api.github.com/repos/joshk/jemalloc-rb/events","assignees_url":"https://api.github.com/repos/joshk/jemalloc-rb/assignees{/user}","branches_url":"https://api.github.com/repos/joshk/jemalloc-rb/branches{/branch}","tags_url":"https://api.github.com/repos/joshk/jemalloc-rb/tags","blobs_url":"https://api.github.com/repos/joshk/jemalloc-rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshk/jemalloc-rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshk/jemalloc-rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshk/jemalloc-rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshk/jemalloc-rb/statuses/{sha}","languages_url":"https://api.github.com/repos/joshk/jemalloc-rb/languages","stargazers_url":"https://api.github.com/repos/joshk/jemalloc-rb/stargazers","contributors_url":"https://api.github.com/repos/joshk/jemalloc-rb/contributors","subscribers_url":"https://api.github.com/repos/joshk/jemalloc-rb/subscribers","subscription_url":"https://api.github.com/repos/joshk/jemalloc-rb/subscription","commits_url":"https://api.github.com/repos/joshk/jemalloc-rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshk/jemalloc-rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshk/jemalloc-rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshk/jemalloc-rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshk/jemalloc-rb/contents/{+path}","compare_url":"https://api.github.com/repos/joshk/jemalloc-rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshk/jemalloc-rb/merges","archive_url":"https://api.github.com/repos/joshk/jemalloc-rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshk/jemalloc-rb/downloads","issues_url":"https://api.github.com/repos/joshk/jemalloc-rb/issues{/number}","pulls_url":"https://api.github.com/repos/joshk/jemalloc-rb/pulls{/number}","milestones_url":"https://api.github.com/repos/joshk/jemalloc-rb/milestones{/number}","notifications_url":"https://api.github.com/repos/joshk/jemalloc-rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshk/jemalloc-rb/labels{/name}","releases_url":"https://api.github.com/repos/joshk/jemalloc-rb/releases{/id}","created_at":"2015-08-25T17:14:40Z","updated_at":"2015-08-25T17:14:40Z","pushed_at":"2015-12-04T15:03:07Z","git_url":"git://github.com/joshk/jemalloc-rb.git","ssh_url":"git@github.com:joshk/jemalloc-rb.git","clone_url":"https://github.com/joshk/jemalloc-rb.git","svn_url":"https://github.com/joshk/jemalloc-rb","homepage":"http://www.canonware.com/jemalloc/","size":2506,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kzk:master","ref":"master","sha":"864fceee6b0185b9914609ebd7bd7d412fd31d43","user":{"login":"kzk","id":108656,"avatar_url":"https://avatars.githubusercontent.com/u/108656?v=3","gravatar_id":"","url":"https://api.github.com/users/kzk","html_url":"https://github.com/kzk","followers_url":"https://api.github.com/users/kzk/followers","following_url":"https://api.github.com/users/kzk/following{/other_user}","gists_url":"https://api.github.com/users/kzk/gists{/gist_id}","starred_url":"https://api.github.com/users/kzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzk/subscriptions","organizations_url":"https://api.github.com/users/kzk/orgs","repos_url":"https://api.github.com/users/kzk/repos","events_url":"https://api.github.com/users/kzk/events{/privacy}","received_events_url":"https://api.github.com/users/kzk/received_events","type":"User","site_admin":false},"repo":{"id":5294358,"name":"jemalloc-rb","full_name":"kzk/jemalloc-rb","owner":{"login":"kzk","id":108656,"avatar_url":"https://avatars.githubusercontent.com/u/108656?v=3","gravatar_id":"","url":"https://api.github.com/users/kzk","html_url":"https://github.com/kzk","followers_url":"https://api.github.com/users/kzk/followers","following_url":"https://api.github.com/users/kzk/following{/other_user}","gists_url":"https://api.github.com/users/kzk/gists{/gist_id}","starred_url":"https://api.github.com/users/kzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzk/subscriptions","organizations_url":"https://api.github.com/users/kzk/orgs","repos_url":"https://api.github.com/users/kzk/repos","events_url":"https://api.github.com/users/kzk/events{/privacy}","received_events_url":"https://api.github.com/users/kzk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kzk/jemalloc-rb","description":"gem install jemalloc && bundle exec je ./script/rails s","fork":false,"url":"https://api.github.com/repos/kzk/jemalloc-rb","forks_url":"https://api.github.com/repos/kzk/jemalloc-rb/forks","keys_url":"https://api.github.com/repos/kzk/jemalloc-rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kzk/jemalloc-rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kzk/jemalloc-rb/teams","hooks_url":"https://api.github.com/repos/kzk/jemalloc-rb/hooks","issue_events_url":"https://api.github.com/repos/kzk/jemalloc-rb/issues/events{/number}","events_url":"https://api.github.com/repos/kzk/jemalloc-rb/events","assignees_url":"https://api.github.com/repos/kzk/jemalloc-rb/assignees{/user}","branches_url":"https://api.github.com/repos/kzk/jemalloc-rb/branches{/branch}","tags_url":"https://api.github.com/repos/kzk/jemalloc-rb/tags","blobs_url":"https://api.github.com/repos/kzk/jemalloc-rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kzk/jemalloc-rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kzk/jemalloc-rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/kzk/jemalloc-rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kzk/jemalloc-rb/statuses/{sha}","languages_url":"https://api.github.com/repos/kzk/jemalloc-rb/languages","stargazers_url":"https://api.github.com/repos/kzk/jemalloc-rb/stargazers","contributors_url":"https://api.github.com/repos/kzk/jemalloc-rb/contributors","subscribers_url":"https://api.github.com/repos/kzk/jemalloc-rb/subscribers","subscription_url":"https://api.github.com/repos/kzk/jemalloc-rb/subscription","commits_url":"https://api.github.com/repos/kzk/jemalloc-rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/kzk/jemalloc-rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/kzk/jemalloc-rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/kzk/jemalloc-rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/kzk/jemalloc-rb/contents/{+path}","compare_url":"https://api.github.com/repos/kzk/jemalloc-rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kzk/jemalloc-rb/merges","archive_url":"https://api.github.com/repos/kzk/jemalloc-rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kzk/jemalloc-rb/downloads","issues_url":"https://api.github.com/repos/kzk/jemalloc-rb/issues{/number}","pulls_url":"https://api.github.com/repos/kzk/jemalloc-rb/pulls{/number}","milestones_url":"https://api.github.com/repos/kzk/jemalloc-rb/milestones{/number}","notifications_url":"https://api.github.com/repos/kzk/jemalloc-rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kzk/jemalloc-rb/labels{/name}","releases_url":"https://api.github.com/repos/kzk/jemalloc-rb/releases{/id}","created_at":"2012-08-04T09:01:32Z","updated_at":"2015-12-04T13:29:24Z","pushed_at":"2015-12-04T15:03:08Z","git_url":"git://github.com/kzk/jemalloc-rb.git","ssh_url":"git@github.com:kzk/jemalloc-rb.git","clone_url":"https://github.com/kzk/jemalloc-rb.git","svn_url":"https://github.com/kzk/jemalloc-rb","homepage":"http://www.canonware.com/jemalloc/","size":1933,"stargazers_count":141,"watchers_count":141,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":3,"forks":10,"open_issues":3,"watchers":141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7"},"html":{"href":"https://github.com/kzk/jemalloc-rb/pull/7"},"issue":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/issues/7"},"comments":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/kzk/jemalloc-rb/statuses/2d8f93ee89a5c4afb1e8fe66cf4ad9cda0fe8f62"}}}}