{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments/27360067","id":27360067,"diff_hunk":"@@ -1,61 +1,82 @@\n # keep only the elements that start with an a\n def select_elements_starting_with_a(array)\n+  array.keep_if {|array| array =~ /\\A[a]/}\n end\n \n # keep only the elements that start with a vowel\n def select_elements_starting_with_vowel(array)\n+  array.keep_if {|array| array =~ /\\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.compact!\n+  array.reject {|array| array == false}\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{|array| array.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).to_a\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+  3.times{array.shift}\n+  array\n end\n \n # add an element to the beginning of an array\n def add_element_to_beginning_of_array(array, element)\n+  array.unshift(element)\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.map{|array| array.reverse}.sort.map{|array| array.reverse}","path":"lib/questions.rb","position":53,"original_position":53,"commit_id":"ba1aab8d31cac31b97cad6569b0fad9cbd65fe13","original_commit_id":"ba1aab8d31cac31b97cad6569b0fad9cbd65fe13","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Shadowing outer local variable - `array`.<br>Space missing to the left of {.<br>Space between { and | missing.<br>Space missing inside }.<br>Pass `&:reverse` as an argument to `map` instead of a block.","created_at":"2015-03-29T22:33:32Z","updated_at":"2015-03-29T22:33:32Z","html_url":"https://github.com/makersacademy/ruby-refresher/pull/20#discussion_r27360067","pull_request_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/comments/27360067"},"html":{"href":"https://github.com/makersacademy/ruby-refresher/pull/20#discussion_r27360067"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20","id":32189598,"html_url":"https://github.com/makersacademy/ruby-refresher/pull/20","diff_url":"https://github.com/makersacademy/ruby-refresher/pull/20.diff","patch_url":"https://github.com/makersacademy/ruby-refresher/pull/20.patch","issue_url":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/20","number":20,"state":"open","locked":false,"title":"Solution","user":{"login":"vvirgitti","id":10236105,"avatar_url":"https://avatars.githubusercontent.com/u/10236105?v=3","gravatar_id":"","url":"https://api.github.com/users/vvirgitti","html_url":"https://github.com/vvirgitti","followers_url":"https://api.github.com/users/vvirgitti/followers","following_url":"https://api.github.com/users/vvirgitti/following{/other_user}","gists_url":"https://api.github.com/users/vvirgitti/gists{/gist_id}","starred_url":"https://api.github.com/users/vvirgitti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvirgitti/subscriptions","organizations_url":"https://api.github.com/users/vvirgitti/orgs","repos_url":"https://api.github.com/users/vvirgitti/repos","events_url":"https://api.github.com/users/vvirgitti/events{/privacy}","received_events_url":"https://api.github.com/users/vvirgitti/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-29T22:33:24Z","updated_at":"2015-03-29T22:33:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"693e13a8e35a5bfdd585e0c41a4f8465ce24324d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20/commits","review_comments_url":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20/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/20/comments","statuses_url":"https://api.github.com/repos/makersacademy/ruby-refresher/statuses/ba1aab8d31cac31b97cad6569b0fad9cbd65fe13","head":{"label":"vvirgitti:solution","ref":"solution","sha":"ba1aab8d31cac31b97cad6569b0fad9cbd65fe13","user":{"login":"vvirgitti","id":10236105,"avatar_url":"https://avatars.githubusercontent.com/u/10236105?v=3","gravatar_id":"","url":"https://api.github.com/users/vvirgitti","html_url":"https://github.com/vvirgitti","followers_url":"https://api.github.com/users/vvirgitti/followers","following_url":"https://api.github.com/users/vvirgitti/following{/other_user}","gists_url":"https://api.github.com/users/vvirgitti/gists{/gist_id}","starred_url":"https://api.github.com/users/vvirgitti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvirgitti/subscriptions","organizations_url":"https://api.github.com/users/vvirgitti/orgs","repos_url":"https://api.github.com/users/vvirgitti/repos","events_url":"https://api.github.com/users/vvirgitti/events{/privacy}","received_events_url":"https://api.github.com/users/vvirgitti/received_events","type":"User","site_admin":false},"repo":{"id":33002718,"name":"ruby-refresher","full_name":"vvirgitti/ruby-refresher","owner":{"login":"vvirgitti","id":10236105,"avatar_url":"https://avatars.githubusercontent.com/u/10236105?v=3","gravatar_id":"","url":"https://api.github.com/users/vvirgitti","html_url":"https://github.com/vvirgitti","followers_url":"https://api.github.com/users/vvirgitti/followers","following_url":"https://api.github.com/users/vvirgitti/following{/other_user}","gists_url":"https://api.github.com/users/vvirgitti/gists{/gist_id}","starred_url":"https://api.github.com/users/vvirgitti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvirgitti/subscriptions","organizations_url":"https://api.github.com/users/vvirgitti/orgs","repos_url":"https://api.github.com/users/vvirgitti/repos","events_url":"https://api.github.com/users/vvirgitti/events{/privacy}","received_events_url":"https://api.github.com/users/vvirgitti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vvirgitti/ruby-refresher","description":"Let's revisit the basics of Ruby.","fork":true,"url":"https://api.github.com/repos/vvirgitti/ruby-refresher","forks_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/forks","keys_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/teams","hooks_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/hooks","issue_events_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/issues/events{/number}","events_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/events","assignees_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/assignees{/user}","branches_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/branches{/branch}","tags_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/tags","blobs_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/git/refs{/sha}","trees_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/statuses/{sha}","languages_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/languages","stargazers_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/stargazers","contributors_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/contributors","subscribers_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/subscribers","subscription_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/subscription","commits_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/commits{/sha}","git_commits_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/git/commits{/sha}","comments_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/comments{/number}","issue_comment_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/issues/comments{/number}","contents_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/contents/{+path}","compare_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/merges","archive_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/downloads","issues_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/issues{/number}","pulls_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/pulls{/number}","milestones_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/milestones{/number}","notifications_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/labels{/name}","releases_url":"https://api.github.com/repos/vvirgitti/ruby-refresher/releases{/id}","created_at":"2015-03-27T18:32:52Z","updated_at":"2015-03-27T18:32:52Z","pushed_at":"2015-03-29T22:30:38Z","git_url":"git://github.com/vvirgitti/ruby-refresher.git","ssh_url":"git@github.com:vvirgitti/ruby-refresher.git","clone_url":"https://github.com/vvirgitti/ruby-refresher.git","svn_url":"https://github.com/vvirgitti/ruby-refresher","homepage":"","size":220,"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":"fad0daab5c998783b556c2e3cc3749fc7a88c25f","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}","created_at":"2014-02-28T08:59:34Z","updated_at":"2015-03-28T12:40:46Z","pushed_at":"2015-03-29T22:33:24Z","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":220,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":12,"forks":36,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20"},"html":{"href":"https://github.com/makersacademy/ruby-refresher/pull/20"},"issue":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/20"},"comments":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/pulls/20/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/20/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/ruby-refresher/statuses/ba1aab8d31cac31b97cad6569b0fad9cbd65fe13"}}}}