{"comment":{"url":"https://api.github.com/repos/lexac1/code_review/comments/18462599","html_url":"https://github.com/lexac1/code_review/commit/c7dd5ccacea6ff6739944f38db87b8c2cb8052e9#commitcomment-18462599","id":18462599,"user":{"login":"philc","id":8598,"avatar_url":"https://avatars.githubusercontent.com/u/8598?v=3","gravatar_id":"","url":"https://api.github.com/users/philc","html_url":"https://github.com/philc","followers_url":"https://api.github.com/users/philc/followers","following_url":"https://api.github.com/users/philc/following{/other_user}","gists_url":"https://api.github.com/users/philc/gists{/gist_id}","starred_url":"https://api.github.com/users/philc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philc/subscriptions","organizations_url":"https://api.github.com/users/philc/orgs","repos_url":"https://api.github.com/users/philc/repos","events_url":"https://api.github.com/users/philc/events{/privacy}","received_events_url":"https://api.github.com/users/philc/received_events","type":"User","site_admin":false},"position":33,"line":33,"path":"wheel_of_fortune_clone.rb","commit_id":"c7dd5ccacea6ff6739944f38db87b8c2cb8052e9","created_at":"2016-07-31T06:16:42Z","updated_at":"2016-07-31T06:16:42Z","body":"`map` is a good way to do this, but it's working by accident. `x` is a variable which gets assigned the value of each character in @secret_word, but changing x doesn't change @secret_word. `map` doesn't change the original collection at all. It just iterates through each element in the original collection, produces some value for each step in that iteration, and returns a whole new collection. You could replace this line with `@dashed_word = @secret_word.map { |x| \"_\" }` because you don't even need to use the value of `x` -- whatever the character is, you want to return a \"_\"."}}
{"actor":{"display_login":"philc"}}