{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/comments/137281811","pull_request_review_id":60927458,"id":137281811,"diff_hunk":"@@ -14,36 +30,55 @@ def binary_to_decimal\n #       compare individual elements with each other and\n #       you may retrieve the length of an array.\n def array_equals(array1, array2)\n-  puts \"Not implemented\"\n-  return true\n-end\n-\n-# --- END OF METHODS ---\n+  # I nested lines 36-42 because some of the arrays had different numbers\n+  # of elements and wanted to account for the difference.\n+  if array1.length == array2.length\n+    array1.each_index do |index|\n+      if array1.values_at(index) == array2.values_at(index)\n+        return true\n+      else\n+        return false\n+      end # if/else\n+    end # each_index loop\n+  else\n+    # I am unsure why the \"return puts\" code works on line 44. I tried\n+    # assigning the 'Make sure ...' string to a variable and then returning\n+    # the variable which did not work.","path":"binary_and_decimal.rb","position":47,"original_position":47,"commit_id":"738a7e263684e26ac9839d9cbdf2581354f743c6","original_commit_id":"738a7e263684e26ac9839d9cbdf2581354f743c6","user":{"login":"shrutivanw","id":22179475,"avatar_url":"https://avatars1.githubusercontent.com/u/22179475?v=4","gravatar_id":"","url":"https://api.github.com/users/shrutivanw","html_url":"https://github.com/shrutivanw","followers_url":"https://api.github.com/users/shrutivanw/followers","following_url":"https://api.github.com/users/shrutivanw/following{/other_user}","gists_url":"https://api.github.com/users/shrutivanw/gists{/gist_id}","starred_url":"https://api.github.com/users/shrutivanw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrutivanw/subscriptions","organizations_url":"https://api.github.com/users/shrutivanw/orgs","repos_url":"https://api.github.com/users/shrutivanw/repos","events_url":"https://api.github.com/users/shrutivanw/events{/privacy}","received_events_url":"https://api.github.com/users/shrutivanw/received_events","type":"User","site_admin":false},"body":"On line 47, your code ends up returning `nil`. That's what `puts \"Make sure your arrays have the same number of elements.\" evaluates to. It currently works because `nil` is falsy. (See https://github.com/Ada-Developers-Academy/jump-start-live/blob/master/lessons/day2/boolean_expressions.md for more on this.)\r\nWhen you return a string instead, it ends up evaluating to true since strings are truthy and hence the test case doesn't work.\r\nWhilst the truthy and falsy aspects work a certain way in Ruby, this is not the case with most languages. So, I'd recommend adhering to the specifications and explicitly returning true or false.","created_at":"2017-09-06T14:22:11Z","updated_at":"2017-09-06T14:22:11Z","html_url":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43#discussion_r137281811","pull_request_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/comments/137281811"},"html":{"href":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43#discussion_r137281811"},"pull_request":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43","id":138705956,"html_url":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43","diff_url":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43.diff","patch_url":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43.patch","issue_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/43","number":43,"state":"open","locked":false,"title":"Pipes - Angela - Binary and decimal","user":{"login":"awilson2017","id":25270021,"avatar_url":"https://avatars2.githubusercontent.com/u/25270021?v=4","gravatar_id":"","url":"https://api.github.com/users/awilson2017","html_url":"https://github.com/awilson2017","followers_url":"https://api.github.com/users/awilson2017/followers","following_url":"https://api.github.com/users/awilson2017/following{/other_user}","gists_url":"https://api.github.com/users/awilson2017/gists{/gist_id}","starred_url":"https://api.github.com/users/awilson2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilson2017/subscriptions","organizations_url":"https://api.github.com/users/awilson2017/orgs","repos_url":"https://api.github.com/users/awilson2017/repos","events_url":"https://api.github.com/users/awilson2017/events{/privacy}","received_events_url":"https://api.github.com/users/awilson2017/received_events","type":"User","site_admin":false},"body":"# Binary and Decimal\r\nCongratulations! You're submitting your assignment.\r\n","created_at":"2017-08-31T16:03:19Z","updated_at":"2017-09-06T14:22:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdbe33272b993c399651837a93574bb7b35bbe13","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43/commits","review_comments_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43/comments","review_comment_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/43/comments","statuses_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/statuses/738a7e263684e26ac9839d9cbdf2581354f743c6","head":{"label":"awilson2017:master","ref":"master","sha":"738a7e263684e26ac9839d9cbdf2581354f743c6","user":{"login":"awilson2017","id":25270021,"avatar_url":"https://avatars2.githubusercontent.com/u/25270021?v=4","gravatar_id":"","url":"https://api.github.com/users/awilson2017","html_url":"https://github.com/awilson2017","followers_url":"https://api.github.com/users/awilson2017/followers","following_url":"https://api.github.com/users/awilson2017/following{/other_user}","gists_url":"https://api.github.com/users/awilson2017/gists{/gist_id}","starred_url":"https://api.github.com/users/awilson2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilson2017/subscriptions","organizations_url":"https://api.github.com/users/awilson2017/orgs","repos_url":"https://api.github.com/users/awilson2017/repos","events_url":"https://api.github.com/users/awilson2017/events{/privacy}","received_events_url":"https://api.github.com/users/awilson2017/received_events","type":"User","site_admin":false},"repo":{"id":101943318,"name":"BinaryAndDecimal","full_name":"awilson2017/BinaryAndDecimal","owner":{"login":"awilson2017","id":25270021,"avatar_url":"https://avatars2.githubusercontent.com/u/25270021?v=4","gravatar_id":"","url":"https://api.github.com/users/awilson2017","html_url":"https://github.com/awilson2017","followers_url":"https://api.github.com/users/awilson2017/followers","following_url":"https://api.github.com/users/awilson2017/following{/other_user}","gists_url":"https://api.github.com/users/awilson2017/gists{/gist_id}","starred_url":"https://api.github.com/users/awilson2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awilson2017/subscriptions","organizations_url":"https://api.github.com/users/awilson2017/orgs","repos_url":"https://api.github.com/users/awilson2017/repos","events_url":"https://api.github.com/users/awilson2017/events{/privacy}","received_events_url":"https://api.github.com/users/awilson2017/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awilson2017/BinaryAndDecimal","description":"Homework exercises after CS Fun class on Binary and Memory","fork":true,"url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal","forks_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/forks","keys_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/teams","hooks_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/hooks","issue_events_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/issues/events{/number}","events_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/events","assignees_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/assignees{/user}","branches_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/branches{/branch}","tags_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/tags","blobs_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/git/refs{/sha}","trees_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/statuses/{sha}","languages_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/languages","stargazers_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/stargazers","contributors_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/contributors","subscribers_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/subscribers","subscription_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/subscription","commits_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/commits{/sha}","git_commits_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/git/commits{/sha}","comments_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/comments{/number}","issue_comment_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/issues/comments{/number}","contents_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/contents/{+path}","compare_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/merges","archive_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/downloads","issues_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/issues{/number}","pulls_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/pulls{/number}","milestones_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/milestones{/number}","notifications_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/labels{/name}","releases_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/releases{/id}","deployments_url":"https://api.github.com/repos/awilson2017/BinaryAndDecimal/deployments","created_at":"2017-08-31T00:59:09Z","updated_at":"2017-08-31T00:59:11Z","pushed_at":"2017-08-31T15:53:05Z","git_url":"git://github.com/awilson2017/BinaryAndDecimal.git","ssh_url":"git@github.com:awilson2017/BinaryAndDecimal.git","clone_url":"https://github.com/awilson2017/BinaryAndDecimal.git","svn_url":"https://github.com/awilson2017/BinaryAndDecimal","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"Ada-C8:master","ref":"master","sha":"9165582fa988abb3d1589524e97e5be3e4b6cd2e","user":{"login":"Ada-C8","id":29872956,"avatar_url":"https://avatars2.githubusercontent.com/u/29872956?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C8","html_url":"https://github.com/Ada-C8","followers_url":"https://api.github.com/users/Ada-C8/followers","following_url":"https://api.github.com/users/Ada-C8/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C8/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C8/subscriptions","organizations_url":"https://api.github.com/users/Ada-C8/orgs","repos_url":"https://api.github.com/users/Ada-C8/repos","events_url":"https://api.github.com/users/Ada-C8/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C8/received_events","type":"Organization","site_admin":false},"repo":{"id":101226567,"name":"BinaryAndDecimal","full_name":"Ada-C8/BinaryAndDecimal","owner":{"login":"Ada-C8","id":29872956,"avatar_url":"https://avatars2.githubusercontent.com/u/29872956?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C8","html_url":"https://github.com/Ada-C8","followers_url":"https://api.github.com/users/Ada-C8/followers","following_url":"https://api.github.com/users/Ada-C8/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C8/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C8/subscriptions","organizations_url":"https://api.github.com/users/Ada-C8/orgs","repos_url":"https://api.github.com/users/Ada-C8/repos","events_url":"https://api.github.com/users/Ada-C8/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-C8/BinaryAndDecimal","description":"Homework exercises after CS Fun class on Binary and Memory","fork":true,"url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal","forks_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/forks","keys_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/teams","hooks_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/hooks","issue_events_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/events","assignees_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/tags","blobs_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/languages","stargazers_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/stargazers","contributors_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/contributors","subscribers_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/subscribers","subscription_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/subscription","commits_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/merges","archive_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/downloads","issues_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/deployments","created_at":"2017-08-23T21:29:21Z","updated_at":"2017-08-23T21:29:22Z","pushed_at":"2017-09-01T08:20:44Z","git_url":"git://github.com/Ada-C8/BinaryAndDecimal.git","ssh_url":"git@github.com:Ada-C8/BinaryAndDecimal.git","clone_url":"https://github.com/Ada-C8/BinaryAndDecimal.git","svn_url":"https://github.com/Ada-C8/BinaryAndDecimal","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":44,"forks":46,"open_issues":44,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43"},"html":{"href":"https://github.com/Ada-C8/BinaryAndDecimal/pull/43"},"issue":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/43"},"comments":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C8/BinaryAndDecimal/statuses/738a7e263684e26ac9839d9cbdf2581354f743c6"}},"author_association":"NONE"}}
{"actor":{"display_login":"shrutivanw"}}