GitHub PullRequestReviewCommentEvent at 2014-01-10 01:06:25
Repository: hamster
Actor: gcapizzi
Payload: {"comment":{"url":"https://api.github.com/repos/hamstergem/hamster/pulls/comments/8777648","id":8777648,"diff_hunk":"@@ -0,0 +1,12 @@\n+module Hamster\n+  module Groupable\n+    def group_by_with(empty_group, &block)\n+      return group_by { |item| item } unless block_given?","path":"lib/hamster/groupable.rb","position":4,"original_position":4,"commit_id":"992d98a2f08b443e46b03422e5e183d76b0880fe","original_commit_id":"992d98a2f08b443e46b03422e5e183d76b0880fe","user":{"login":"gcapizzi","id":251425,"avatar_url":"https://gravatar.com/avatar/4e74fcca0dd20191c0f75e50125e30d6?d=https%3A%2F%2Fidenticons.github.com%2Fc75a2ddd0fc3e7a7a2d296e5000c06cb.png&r=x","gravatar_id":"4e74fcca0dd20191c0f75e50125e30d6","url":"https://api.github.com/users/gcapizzi","html_url":"https://github.com/gcapizzi","followers_url":"https://api.github.com/users/gcapizzi/followers","following_url":"https://api.github.com/users/gcapizzi/following{/other_user}","gists_url":"https://api.github.com/users/gcapizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/gcapizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcapizzi/subscriptions","organizations_url":"https://api.github.com/users/gcapizzi/orgs","repos_url":"https://api.github.com/users/gcapizzi/repos","events_url":"https://api.github.com/users/gcapizzi/events{/privacy}","received_events_url":"https://api.github.com/users/gcapizzi/received_events","type":"User","site_admin":false},"body":"I've just extracted the code, that's how it was done in `List#group_by` and `Set#group_by`. I've seen early returns elsewhere also, they're pretty widespread in the codebase.","created_at":"2014-01-10T01:06:25Z","updated_at":"2014-01-10T01:06:25Z","html_url":"https://github.com/hamstergem/hamster/pull/78#discussion_r8777648","pull_request_url":"https://api.github.com/repos/hamstergem/hamster/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/hamstergem/hamster/pulls/comments/8777648"},"html":{"href":"https://github.com/hamstergem/hamster/pull/78#discussion_r8777648"},"pull_request":{"href":"https://api.github.com/repos/hamstergem/hamster/pulls/78"}}}}