{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments/60796999","id":60796999,"diff_hunk":"@@ -1,184 +1,229 @@\n # keep only the elements that start with an a\n def select_elements_starting_with_a(array)\n+  array.select {|element| element[0] == 'a' }\n end\n \n # keep only the elements that start with a vowel\n def select_elements_starting_with_vowel(array)\n+  array.select {|element| element =~ /\\A[aeiou]/}\n end\n \n # remove instances of nil (but NOT false) from an array\n def remove_nils_from_array(array)\n+  array.compact!\n end\n \n # remove instances of nil AND false from an array\n def remove_nils_and_false_from_array(array)\n+  array.select{|element| element}\n end\n \n # don't reverse the array, but reverse every word inside it. e.g.\n # ['dog', 'monkey'] becomes ['god', 'yeknom']\n def reverse_every_element_in_array(array)\n+  array.map(&:reverse)\n end\n \n # given an array of student names, like ['Bob', 'Dave', 'Clive']\n # give every possible pairing - in this case:\n # [['Bob', 'Clive'], ['Bob', 'Dave'], ['Clive', 'Dave']]\n-# make sure you don't have the same pairing twice, \n+# make sure you don't have the same pairing twice,\n def every_possible_pairing_of_students(array)\n+  array.combination(2)\n end\n \n-# discard the first 3 elements of an array, \n+# discard the first 3 elements of an array,\n # e.g. [1, 2, 3, 4, 5, 6] becomes [4, 5, 6]\n def all_elements_except_first_3(array)\n+  array[3..-1]\n end\n \n # add an element to the beginning of an array\n def add_element_to_beginning_of_array(array, element)\n+  [element].concat(array)\n end\n \n # sort an array of words by their last letter, e.g.\n # ['sky', 'puma', 'maker'] becomes ['puma', 'maker', 'sky']\n def array_sort_by_last_letter_of_word(array)\n+  array.sort_by{|word| word[-1]}\n end\n \n # cut strings in half, and return the first half, e.g.\n # 'banana' becomes 'ban'. If the string is an odd number of letters\n # round up - so 'apple' becomes 'app'\n def get_first_half_of_string(string)\n+  string[0..(string.length/2.0).ceil - 1]","path":"lib/questions.rb","position":58,"original_position":58,"commit_id":"36156f08c37f41da222e0c70f50d3bbef2051ed7","original_commit_id":"36156f08c37f41da222e0c70f50d3bbef2051ed7","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Surrounding space missing for operator `/`.","created_at":"2016-04-22T20:16:55Z","updated_at":"2016-04-22T20:16:55Z","html_url":"https://github.com/makersacademy/ruby-refresher/pull/29#discussion_r60796999","pull_request_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments/60796999"},"html":{"href":"https://github.com/makersacademy/ruby-refresher/pull/29#discussion_r60796999"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29","id":67566825,"html_url":"https://github.com/makersacademy/ruby-refresher/pull/29","diff_url":"https://github.com/makersacademy/ruby-refresher/pull/29.diff","patch_url":"https://github.com/makersacademy/ruby-refresher/pull/29.patch","issue_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/29","number":29,"state":"open","locked":false,"title":"Han's solutions","user":{"login":"hanfak","id":15229697,"avatar_url":"https://avatars.githubusercontent.com/u/15229697?v=3","gravatar_id":"","url":"https://api.github.com/users/hanfak","html_url":"https://github.com/hanfak","followers_url":"https://api.github.com/users/hanfak/followers","following_url":"https://api.github.com/users/hanfak/following{/other_user}","gists_url":"https://api.github.com/users/hanfak/gists{/gist_id}","starred_url":"https://api.github.com/users/hanfak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanfak/subscriptions","organizations_url":"https://api.github.com/users/hanfak/orgs","repos_url":"https://api.github.com/users/hanfak/repos","events_url":"https://api.github.com/users/hanfak/events{/privacy}","received_events_url":"https://api.github.com/users/hanfak/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-22T20:16:51Z","updated_at":"2016-04-22T20:16:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e3be409bb381c342ba52e662ddf9a2953a31cde","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29/commits","review_comments_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29/comments","review_comment_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/29/comments","statuses_url":"https://api.github.com/repos/makersacademy/ruby-refresher/statuses/36156f08c37f41da222e0c70f50d3bbef2051ed7","head":{"label":"hanfak:master","ref":"master","sha":"36156f08c37f41da222e0c70f50d3bbef2051ed7","user":{"login":"hanfak","id":15229697,"avatar_url":"https://avatars.githubusercontent.com/u/15229697?v=3","gravatar_id":"","url":"https://api.github.com/users/hanfak","html_url":"https://github.com/hanfak","followers_url":"https://api.github.com/users/hanfak/followers","following_url":"https://api.github.com/users/hanfak/following{/other_user}","gists_url":"https://api.github.com/users/hanfak/gists{/gist_id}","starred_url":"https://api.github.com/users/hanfak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanfak/subscriptions","organizations_url":"https://api.github.com/users/hanfak/orgs","repos_url":"https://api.github.com/users/hanfak/repos","events_url":"https://api.github.com/users/hanfak/events{/privacy}","received_events_url":"https://api.github.com/users/hanfak/received_events","type":"User","site_admin":false},"repo":{"id":56870629,"name":"ruby-refresher","full_name":"hanfak/ruby-refresher","owner":{"login":"hanfak","id":15229697,"avatar_url":"https://avatars.githubusercontent.com/u/15229697?v=3","gravatar_id":"","url":"https://api.github.com/users/hanfak","html_url":"https://github.com/hanfak","followers_url":"https://api.github.com/users/hanfak/followers","following_url":"https://api.github.com/users/hanfak/following{/other_user}","gists_url":"https://api.github.com/users/hanfak/gists{/gist_id}","starred_url":"https://api.github.com/users/hanfak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanfak/subscriptions","organizations_url":"https://api.github.com/users/hanfak/orgs","repos_url":"https://api.github.com/users/hanfak/repos","events_url":"https://api.github.com/users/hanfak/events{/privacy}","received_events_url":"https://api.github.com/users/hanfak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanfak/ruby-refresher","description":"Let's revisit the basics of Ruby.","fork":true,"url":"https://api.github.com/repos/hanfak/ruby-refresher","forks_url":"https://api.github.com/repos/hanfak/ruby-refresher/forks","keys_url":"https://api.github.com/repos/hanfak/ruby-refresher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanfak/ruby-refresher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanfak/ruby-refresher/teams","hooks_url":"https://api.github.com/repos/hanfak/ruby-refresher/hooks","issue_events_url":"https://api.github.com/repos/hanfak/ruby-refresher/issues/events{/number}","events_url":"https://api.github.com/repos/hanfak/ruby-refresher/events","assignees_url":"https://api.github.com/repos/hanfak/ruby-refresher/assignees{/user}","branches_url":"https://api.github.com/repos/hanfak/ruby-refresher/branches{/branch}","tags_url":"https://api.github.com/repos/hanfak/ruby-refresher/tags","blobs_url":"https://api.github.com/repos/hanfak/ruby-refresher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanfak/ruby-refresher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanfak/ruby-refresher/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanfak/ruby-refresher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanfak/ruby-refresher/statuses/{sha}","languages_url":"https://api.github.com/repos/hanfak/ruby-refresher/languages","stargazers_url":"https://api.github.com/repos/hanfak/ruby-refresher/stargazers","contributors_url":"https://api.github.com/repos/hanfak/ruby-refresher/contributors","subscribers_url":"https://api.github.com/repos/hanfak/ruby-refresher/subscribers","subscription_url":"https://api.github.com/repos/hanfak/ruby-refresher/subscription","commits_url":"https://api.github.com/repos/hanfak/ruby-refresher/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanfak/ruby-refresher/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanfak/ruby-refresher/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanfak/ruby-refresher/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanfak/ruby-refresher/contents/{+path}","compare_url":"https://api.github.com/repos/hanfak/ruby-refresher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanfak/ruby-refresher/merges","archive_url":"https://api.github.com/repos/hanfak/ruby-refresher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanfak/ruby-refresher/downloads","issues_url":"https://api.github.com/repos/hanfak/ruby-refresher/issues{/number}","pulls_url":"https://api.github.com/repos/hanfak/ruby-refresher/pulls{/number}","milestones_url":"https://api.github.com/repos/hanfak/ruby-refresher/milestones{/number}","notifications_url":"https://api.github.com/repos/hanfak/ruby-refresher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanfak/ruby-refresher/labels{/name}","releases_url":"https://api.github.com/repos/hanfak/ruby-refresher/releases{/id}","deployments_url":"https://api.github.com/repos/hanfak/ruby-refresher/deployments","created_at":"2016-04-22T16:42:11Z","updated_at":"2016-04-22T16:42:11Z","pushed_at":"2016-04-22T20:16:27Z","git_url":"git://github.com/hanfak/ruby-refresher.git","ssh_url":"git@github.com:hanfak/ruby-refresher.git","clone_url":"https://github.com/hanfak/ruby-refresher.git","svn_url":"https://github.com/hanfak/ruby-refresher","homepage":"","size":96,"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":"makersacademy:master","ref":"master","sha":"5bb4e226b8bc2ac36d5a571fd155e1ca56d35ed9","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":17280753,"name":"ruby-refresher","full_name":"makersacademy/ruby-refresher","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/ruby-refresher","description":"Let's revisit the basics of Ruby.","fork":true,"url":"https://api.github.com/repos/makersacademy/ruby-refresher","forks_url":"https://api.github.com/repos/makersacademy/ruby-refresher/forks","keys_url":"https://api.github.com/repos/makersacademy/ruby-refresher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/ruby-refresher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/ruby-refresher/teams","hooks_url":"https://api.github.com/repos/makersacademy/ruby-refresher/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/ruby-refresher/events","assignees_url":"https://api.github.com/repos/makersacademy/ruby-refresher/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/ruby-refresher/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/ruby-refresher/tags","blobs_url":"https://api.github.com/repos/makersacademy/ruby-refresher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/ruby-refresher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/ruby-refresher/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/ruby-refresher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/ruby-refresher/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/ruby-refresher/languages","stargazers_url":"https://api.github.com/repos/makersacademy/ruby-refresher/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/ruby-refresher/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/ruby-refresher/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/ruby-refresher/subscription","commits_url":"https://api.github.com/repos/makersacademy/ruby-refresher/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/ruby-refresher/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/ruby-refresher/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/ruby-refresher/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/ruby-refresher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/ruby-refresher/merges","archive_url":"https://api.github.com/repos/makersacademy/ruby-refresher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/ruby-refresher/downloads","issues_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/ruby-refresher/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/ruby-refresher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/ruby-refresher/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/ruby-refresher/releases{/id}","deployments_url":"https://api.github.com/repos/makersacademy/ruby-refresher/deployments","created_at":"2014-02-28T08:59:34Z","updated_at":"2016-03-21T11:00:04Z","pushed_at":"2016-04-22T20:16:51Z","git_url":"git://github.com/makersacademy/ruby-refresher.git","ssh_url":"git@github.com:makersacademy/ruby-refresher.git","clone_url":"https://github.com/makersacademy/ruby-refresher.git","svn_url":"https://github.com/makersacademy/ruby-refresher","homepage":"","size":96,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":5,"forks":71,"open_issues":5,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29"},"html":{"href":"https://github.com/makersacademy/ruby-refresher/pull/29"},"issue":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/29"},"comments":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/statuses/36156f08c37f41da222e0c70f50d3bbef2051ed7"}}}}