{"action":"created","comment":{"url":"https://api.github.com/repos/google/protobuf/pulls/comments/31881288","id":31881288,"diff_hunk":"@@ -695,7 +700,7 @@ private String layoutInspect() {\n         for (Descriptors.FieldDescriptor fdef : descriptor.getFields()) {\n             sb.append(Utils.unescapeIdentifier(fdef.getName()));\n             sb.append(\": \");\n-            sb.append(getField(context, fdef).inspect());\n+            sb.append(Helpers.invoke(context, getField(context, fdef), \"inspect\"));","path":"ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java","position":26,"original_position":26,"commit_id":"15c2c009771a665927b835da4b49555d1105b6f4","original_commit_id":"15c2c009771a665927b835da4b49555d1105b6f4","user":{"login":"skippy","id":3746,"avatar_url":"https://avatars.githubusercontent.com/u/3746?v=3","gravatar_id":"","url":"https://api.github.com/users/skippy","html_url":"https://github.com/skippy","followers_url":"https://api.github.com/users/skippy/followers","following_url":"https://api.github.com/users/skippy/following{/other_user}","gists_url":"https://api.github.com/users/skippy/gists{/gist_id}","starred_url":"https://api.github.com/users/skippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skippy/subscriptions","organizations_url":"https://api.github.com/users/skippy/orgs","repos_url":"https://api.github.com/users/skippy/repos","events_url":"https://api.github.com/users/skippy/events{/privacy}","received_events_url":"https://api.github.com/users/skippy/received_events","type":"User","site_admin":false},"body":"this is a jruby-9000 fix.","created_at":"2015-06-07T22:08:38Z","updated_at":"2015-06-07T22:08:38Z","html_url":"https://github.com/google/protobuf/pull/396#discussion_r31881288","pull_request_url":"https://api.github.com/repos/google/protobuf/pulls/396","_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments/31881288"},"html":{"href":"https://github.com/google/protobuf/pull/396#discussion_r31881288"},"pull_request":{"href":"https://api.github.com/repos/google/protobuf/pulls/396"}}},"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/396","id":35566338,"html_url":"https://github.com/google/protobuf/pull/396","diff_url":"https://github.com/google/protobuf/pull/396.diff","patch_url":"https://github.com/google/protobuf/pull/396.patch","issue_url":"https://api.github.com/repos/google/protobuf/issues/396","number":396,"state":"open","locked":false,"title":"ruby: Map to_h fixes","user":{"login":"skippy","id":3746,"avatar_url":"https://avatars.githubusercontent.com/u/3746?v=3","gravatar_id":"","url":"https://api.github.com/users/skippy","html_url":"https://github.com/skippy","followers_url":"https://api.github.com/users/skippy/followers","following_url":"https://api.github.com/users/skippy/following{/other_user}","gists_url":"https://api.github.com/users/skippy/gists{/gist_id}","starred_url":"https://api.github.com/users/skippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skippy/subscriptions","organizations_url":"https://api.github.com/users/skippy/orgs","repos_url":"https://api.github.com/users/skippy/repos","events_url":"https://api.github.com/users/skippy/events{/privacy}","received_events_url":"https://api.github.com/users/skippy/received_events","type":"User","site_admin":false},"body":"The one change from the previous commit (#338) is that `#to_h` returns its keys as strings instead of symbols.  The main reason i changed this back (and sorry for the flip in behavior) is that map allows many different types, and having a map defined with a string key, but then it returns a symbol, seems like that would cause confusion because of its inconsistencies.  \r\n\r\nthis patch is a bit wonky because there is a jruby AST parse error that required odd code to work around in one of the tests.  See comments below.\r\n\r\nalso, a bug was found.  the `encode_json` method, when run under MRI, does not return the expected result.  It does not return default values, which it probably should.  The Java code runs as I would expect.  There is a comment below about that as well","created_at":"2015-05-16T06:01:56Z","updated_at":"2015-06-07T22:08:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db1c563a6925d83bf148ee7846eb04cf12a198ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/protobuf/pulls/396/commits","review_comments_url":"https://api.github.com/repos/google/protobuf/pulls/396/comments","review_comment_url":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/protobuf/issues/396/comments","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/15c2c009771a665927b835da4b49555d1105b6f4","head":{"label":"skippy:map-to_h-fixes","ref":"map-to_h-fixes","sha":"15c2c009771a665927b835da4b49555d1105b6f4","user":{"login":"skippy","id":3746,"avatar_url":"https://avatars.githubusercontent.com/u/3746?v=3","gravatar_id":"","url":"https://api.github.com/users/skippy","html_url":"https://github.com/skippy","followers_url":"https://api.github.com/users/skippy/followers","following_url":"https://api.github.com/users/skippy/following{/other_user}","gists_url":"https://api.github.com/users/skippy/gists{/gist_id}","starred_url":"https://api.github.com/users/skippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skippy/subscriptions","organizations_url":"https://api.github.com/users/skippy/orgs","repos_url":"https://api.github.com/users/skippy/repos","events_url":"https://api.github.com/users/skippy/events{/privacy}","received_events_url":"https://api.github.com/users/skippy/received_events","type":"User","site_admin":false},"repo":{"id":34908314,"name":"protobuf-1","full_name":"skippy/protobuf-1","owner":{"login":"skippy","id":3746,"avatar_url":"https://avatars.githubusercontent.com/u/3746?v=3","gravatar_id":"","url":"https://api.github.com/users/skippy","html_url":"https://github.com/skippy","followers_url":"https://api.github.com/users/skippy/followers","following_url":"https://api.github.com/users/skippy/following{/other_user}","gists_url":"https://api.github.com/users/skippy/gists{/gist_id}","starred_url":"https://api.github.com/users/skippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skippy/subscriptions","organizations_url":"https://api.github.com/users/skippy/orgs","repos_url":"https://api.github.com/users/skippy/repos","events_url":"https://api.github.com/users/skippy/events{/privacy}","received_events_url":"https://api.github.com/users/skippy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skippy/protobuf-1","description":"Protocol Buffers - Google's data interchange format","fork":true,"url":"https://api.github.com/repos/skippy/protobuf-1","forks_url":"https://api.github.com/repos/skippy/protobuf-1/forks","keys_url":"https://api.github.com/repos/skippy/protobuf-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skippy/protobuf-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skippy/protobuf-1/teams","hooks_url":"https://api.github.com/repos/skippy/protobuf-1/hooks","issue_events_url":"https://api.github.com/repos/skippy/protobuf-1/issues/events{/number}","events_url":"https://api.github.com/repos/skippy/protobuf-1/events","assignees_url":"https://api.github.com/repos/skippy/protobuf-1/assignees{/user}","branches_url":"https://api.github.com/repos/skippy/protobuf-1/branches{/branch}","tags_url":"https://api.github.com/repos/skippy/protobuf-1/tags","blobs_url":"https://api.github.com/repos/skippy/protobuf-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skippy/protobuf-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skippy/protobuf-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/skippy/protobuf-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skippy/protobuf-1/statuses/{sha}","languages_url":"https://api.github.com/repos/skippy/protobuf-1/languages","stargazers_url":"https://api.github.com/repos/skippy/protobuf-1/stargazers","contributors_url":"https://api.github.com/repos/skippy/protobuf-1/contributors","subscribers_url":"https://api.github.com/repos/skippy/protobuf-1/subscribers","subscription_url":"https://api.github.com/repos/skippy/protobuf-1/subscription","commits_url":"https://api.github.com/repos/skippy/protobuf-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/skippy/protobuf-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/skippy/protobuf-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/skippy/protobuf-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/skippy/protobuf-1/contents/{+path}","compare_url":"https://api.github.com/repos/skippy/protobuf-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skippy/protobuf-1/merges","archive_url":"https://api.github.com/repos/skippy/protobuf-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skippy/protobuf-1/downloads","issues_url":"https://api.github.com/repos/skippy/protobuf-1/issues{/number}","pulls_url":"https://api.github.com/repos/skippy/protobuf-1/pulls{/number}","milestones_url":"https://api.github.com/repos/skippy/protobuf-1/milestones{/number}","notifications_url":"https://api.github.com/repos/skippy/protobuf-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skippy/protobuf-1/labels{/name}","releases_url":"https://api.github.com/repos/skippy/protobuf-1/releases{/id}","created_at":"2015-05-01T15:07:32Z","updated_at":"2015-05-14T23:00:33Z","pushed_at":"2015-06-07T22:06:34Z","git_url":"git://github.com/skippy/protobuf-1.git","ssh_url":"git@github.com:skippy/protobuf-1.git","clone_url":"https://github.com/skippy/protobuf-1.git","svn_url":"https://github.com/skippy/protobuf-1","homepage":"https://developers.google.com/protocol-buffers/","size":28656,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"3f9be70d067fb03cd03f99522473dee265b84ddb","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":23357588,"name":"protobuf","full_name":"google/protobuf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":false,"url":"https://api.github.com/repos/google/protobuf","forks_url":"https://api.github.com/repos/google/protobuf/forks","keys_url":"https://api.github.com/repos/google/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/protobuf/teams","hooks_url":"https://api.github.com/repos/google/protobuf/hooks","issue_events_url":"https://api.github.com/repos/google/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/google/protobuf/events","assignees_url":"https://api.github.com/repos/google/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/google/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/google/protobuf/tags","blobs_url":"https://api.github.com/repos/google/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/protobuf/languages","stargazers_url":"https://api.github.com/repos/google/protobuf/stargazers","contributors_url":"https://api.github.com/repos/google/protobuf/contributors","subscribers_url":"https://api.github.com/repos/google/protobuf/subscribers","subscription_url":"https://api.github.com/repos/google/protobuf/subscription","commits_url":"https://api.github.com/repos/google/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/google/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/protobuf/merges","archive_url":"https://api.github.com/repos/google/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/protobuf/downloads","issues_url":"https://api.github.com/repos/google/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/google/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/google/protobuf/releases{/id}","created_at":"2014-08-26T15:52:15Z","updated_at":"2015-06-07T22:08:38Z","pushed_at":"2015-06-07T22:06:34Z","git_url":"git://github.com/google/protobuf.git","ssh_url":"git@github.com:google/protobuf.git","clone_url":"https://github.com/google/protobuf.git","svn_url":"https://github.com/google/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":45972,"stargazers_count":3565,"watchers_count":3565,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":917,"mirror_url":null,"open_issues_count":141,"forks":917,"open_issues":141,"watchers":3565,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/396"},"html":{"href":"https://github.com/google/protobuf/pull/396"},"issue":{"href":"https://api.github.com/repos/google/protobuf/issues/396"},"comments":{"href":"https://api.github.com/repos/google/protobuf/issues/396/comments"},"review_comments":{"href":"https://api.github.com/repos/google/protobuf/pulls/396/comments"},"review_comment":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/protobuf/pulls/396/commits"},"statuses":{"href":"https://api.github.com/repos/google/protobuf/statuses/15c2c009771a665927b835da4b49555d1105b6f4"}}}}