{"action":"created","comment":{"url":"https://api.github.com/repos/jruby/jruby/pulls/comments/230159585","pull_request_review_id":170824175,"id":230159585,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDE1OTU4NQ==","diff_hunk":"@@ -337,4 +337,60 @@ def test_const_set\n     Object.const_set klass_name, klass\n     assert_equal klass_name, klass.name\n   end\n+\n+  class S1\n+    class << self\n+      include Enumerable\n+      class << self\n+        def foo; :foo end\n+      end\n+      def self.bar; :bar end\n+    end\n+    include Kernel\n+  end\n+\n+  class S2 < S1\n+    include Enumerable\n+  end\n+\n+  def test_singleton_class_user_class\n+    assert_same S1.singleton_class, S2.singleton_class.superclass\n+\n+    singleton_singleton_class = S1.singleton_class.singleton_class\n+    assert_same singleton_singleton_class, S2.singleton_class.singleton_class.superclass\n+\n+    assert_same Object.singleton_class.singleton_class, singleton_singleton_class.superclass\n+  end\n+\n+  def test_singleton_class_base_hierarchy\n+    assert_same BasicObject.singleton_class.singleton_class, Object.singleton_class.singleton_class.superclass\n+    assert_equal '#<Class:Class>', Class.singleton_class.inspect\n+    assert_same Class.singleton_class, BasicObject.singleton_class.singleton_class.superclass\n+    assert_same Module.singleton_class, BasicObject.singleton_class.singleton_class.superclass.superclass\n+  end\n+\n+  def test_singleton_class_subclasses\n+    classes = ObjectSpace.each_object(S1.singleton_class.singleton_class).to_a\n+    assert_include classes, S1.singleton_class\n+    assert_include classes, S2.singleton_class\n+    assert_equal 3, classes.size, classes.inspect\n+\n+    classes = ObjectSpace.each_object(S2.singleton_class.singleton_class).to_a\n+    assert_equal [ S2.singleton_class ], classes\n+  end\n+\n+  def test_singleton_class_methods\n+    methods = S1.singleton_class.methods(false)\n+    assert_include methods, :foo\n+    assert_include methods, :bar\n+\n+    methods = S2.singleton_class.methods\n+    #assert_include methods, :foo\n+    #assert_include methods, :bar\n+\n+    methods = Class.new(S1).singleton_class.methods\n+    #assert_include methods, :foo\n+    #assert_include methods, :bar\n+  end\n+","path":"test/jruby/test_class.rb","position":68,"original_position":68,"commit_id":"3c72e1f7baae7449d99e054702ac651aad2fa117","original_commit_id":"3c72e1f7baae7449d99e054702ac651aad2fa117","user":{"login":"headius","id":10135,"node_id":"MDQ6VXNlcjEwMTM1","avatar_url":"https://avatars3.githubusercontent.com/u/10135?v=4","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"body":"There's a couple other tests that pass from MRI, but unsure how many have any relation to this.","created_at":"2018-11-01T19:00:30Z","updated_at":"2018-11-01T19:01:16Z","html_url":"https://github.com/jruby/jruby/pull/5394#discussion_r230159585","pull_request_url":"https://api.github.com/repos/jruby/jruby/pulls/5394","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments/230159585"},"html":{"href":"https://github.com/jruby/jruby/pull/5394#discussion_r230159585"},"pull_request":{"href":"https://api.github.com/repos/jruby/jruby/pulls/5394"}},"in_reply_to_id":230151718},"pull_request":{"url":"https://api.github.com/repos/jruby/jruby/pulls/5394","id":227250429,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MjUwNDI5","html_url":"https://github.com/jruby/jruby/pull/5394","diff_url":"https://github.com/jruby/jruby/pull/5394.diff","patch_url":"https://github.com/jruby/jruby/pull/5394.patch","issue_url":"https://api.github.com/repos/jruby/jruby/issues/5394","number":5394,"state":"open","locked":false,"title":"[fix] singleton meta class","user":{"login":"kares","id":45967,"node_id":"MDQ6VXNlcjQ1OTY3","avatar_url":"https://avatars0.githubusercontent.com/u/45967?v=4","gravatar_id":"","url":"https://api.github.com/users/kares","html_url":"https://github.com/kares","followers_url":"https://api.github.com/users/kares/followers","following_url":"https://api.github.com/users/kares/following{/other_user}","gists_url":"https://api.github.com/users/kares/gists{/gist_id}","starred_url":"https://api.github.com/users/kares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kares/subscriptions","organizations_url":"https://api.github.com/users/kares/orgs","repos_url":"https://api.github.com/users/kares/repos","events_url":"https://api.github.com/users/kares/events{/privacy}","received_events_url":"https://api.github.com/users/kares/received_events","type":"User","site_admin":false},"body":"JRuby seem to never have `Foo.singleton_class.singleton_class` working as expected\r\n... mostly following super-class hierarchy with singleton classes\r\n\r\nthis gets the class hierarchy working, not sure what is left to be done for module's singleton\r\nleft the \"super meta class\" logic as it was for now\r\n\r\nfixes GH-287 ... an old timer :)","created_at":"2018-10-31T11:30:56Z","updated_at":"2018-11-01T19:01:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cfcd74c5e5e66ad99c555e0fd8f9db0bb9d685a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jruby/jruby/pulls/5394/commits","review_comments_url":"https://api.github.com/repos/jruby/jruby/pulls/5394/comments","review_comment_url":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/5394/comments","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/3c72e1f7baae7449d99e054702ac651aad2fa117","head":{"label":"kares:fix-singleton-meta-class","ref":"fix-singleton-meta-class","sha":"3c72e1f7baae7449d99e054702ac651aad2fa117","user":{"login":"kares","id":45967,"node_id":"MDQ6VXNlcjQ1OTY3","avatar_url":"https://avatars0.githubusercontent.com/u/45967?v=4","gravatar_id":"","url":"https://api.github.com/users/kares","html_url":"https://github.com/kares","followers_url":"https://api.github.com/users/kares/followers","following_url":"https://api.github.com/users/kares/following{/other_user}","gists_url":"https://api.github.com/users/kares/gists{/gist_id}","starred_url":"https://api.github.com/users/kares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kares/subscriptions","organizations_url":"https://api.github.com/users/kares/orgs","repos_url":"https://api.github.com/users/kares/repos","events_url":"https://api.github.com/users/kares/events{/privacy}","received_events_url":"https://api.github.com/users/kares/received_events","type":"User","site_admin":false},"repo":{"id":1899113,"node_id":"MDEwOlJlcG9zaXRvcnkxODk5MTEz","name":"jruby","full_name":"kares/jruby","private":false,"owner":{"login":"kares","id":45967,"node_id":"MDQ6VXNlcjQ1OTY3","avatar_url":"https://avatars0.githubusercontent.com/u/45967?v=4","gravatar_id":"","url":"https://api.github.com/users/kares","html_url":"https://github.com/kares","followers_url":"https://api.github.com/users/kares/followers","following_url":"https://api.github.com/users/kares/following{/other_user}","gists_url":"https://api.github.com/users/kares/gists{/gist_id}","starred_url":"https://api.github.com/users/kares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kares/subscriptions","organizations_url":"https://api.github.com/users/kares/orgs","repos_url":"https://api.github.com/users/kares/repos","events_url":"https://api.github.com/users/kares/events{/privacy}","received_events_url":"https://api.github.com/users/kares/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kares/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":true,"url":"https://api.github.com/repos/kares/jruby","forks_url":"https://api.github.com/repos/kares/jruby/forks","keys_url":"https://api.github.com/repos/kares/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kares/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kares/jruby/teams","hooks_url":"https://api.github.com/repos/kares/jruby/hooks","issue_events_url":"https://api.github.com/repos/kares/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/kares/jruby/events","assignees_url":"https://api.github.com/repos/kares/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/kares/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/kares/jruby/tags","blobs_url":"https://api.github.com/repos/kares/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kares/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kares/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/kares/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kares/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/kares/jruby/languages","stargazers_url":"https://api.github.com/repos/kares/jruby/stargazers","contributors_url":"https://api.github.com/repos/kares/jruby/contributors","subscribers_url":"https://api.github.com/repos/kares/jruby/subscribers","subscription_url":"https://api.github.com/repos/kares/jruby/subscription","commits_url":"https://api.github.com/repos/kares/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/kares/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/kares/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/kares/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/kares/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/kares/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kares/jruby/merges","archive_url":"https://api.github.com/repos/kares/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kares/jruby/downloads","issues_url":"https://api.github.com/repos/kares/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/kares/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/kares/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/kares/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kares/jruby/labels{/name}","releases_url":"https://api.github.com/repos/kares/jruby/releases{/id}","deployments_url":"https://api.github.com/repos/kares/jruby/deployments","created_at":"2011-06-15T08:44:13Z","updated_at":"2018-10-31T09:33:49Z","pushed_at":"2018-10-31T16:40:29Z","git_url":"git://github.com/kares/jruby.git","ssh_url":"git@github.com:kares/jruby.git","clone_url":"https://github.com/kares/jruby.git","svn_url":"https://github.com/kares/jruby","homepage":"http://www.jruby.org","size":237814,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jruby:master","ref":"master","sha":"475b374e1e251a2ed17a30982925dca7c53d02ef","user":{"login":"jruby","id":55687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1Njg3","avatar_url":"https://avatars2.githubusercontent.com/u/55687?v=4","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"repo":{"id":168370,"node_id":"MDEwOlJlcG9zaXRvcnkxNjgzNzA=","name":"jruby","full_name":"jruby/jruby","private":false,"owner":{"login":"jruby","id":55687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1Njg3","avatar_url":"https://avatars2.githubusercontent.com/u/55687?v=4","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/jruby/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":false,"url":"https://api.github.com/repos/jruby/jruby","forks_url":"https://api.github.com/repos/jruby/jruby/forks","keys_url":"https://api.github.com/repos/jruby/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jruby/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jruby/jruby/teams","hooks_url":"https://api.github.com/repos/jruby/jruby/hooks","issue_events_url":"https://api.github.com/repos/jruby/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/jruby/jruby/events","assignees_url":"https://api.github.com/repos/jruby/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/jruby/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/jruby/jruby/tags","blobs_url":"https://api.github.com/repos/jruby/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jruby/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jruby/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/jruby/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/jruby/jruby/languages","stargazers_url":"https://api.github.com/repos/jruby/jruby/stargazers","contributors_url":"https://api.github.com/repos/jruby/jruby/contributors","subscribers_url":"https://api.github.com/repos/jruby/jruby/subscribers","subscription_url":"https://api.github.com/repos/jruby/jruby/subscription","commits_url":"https://api.github.com/repos/jruby/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/jruby/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/jruby/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/jruby/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/jruby/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/jruby/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jruby/jruby/merges","archive_url":"https://api.github.com/repos/jruby/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jruby/jruby/downloads","issues_url":"https://api.github.com/repos/jruby/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/jruby/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/jruby/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/jruby/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jruby/jruby/labels{/name}","releases_url":"https://api.github.com/repos/jruby/jruby/releases{/id}","deployments_url":"https://api.github.com/repos/jruby/jruby/deployments","created_at":"2009-04-05T03:54:35Z","updated_at":"2018-11-01T18:19:38Z","pushed_at":"2018-11-01T18:19:28Z","git_url":"git://github.com/jruby/jruby.git","ssh_url":"git@github.com:jruby/jruby.git","clone_url":"https://github.com/jruby/jruby.git","svn_url":"https://github.com/jruby/jruby","homepage":"http://www.jruby.org","size":227034,"stargazers_count":3212,"watchers_count":3212,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":807,"mirror_url":null,"archived":false,"open_issues_count":587,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":807,"open_issues":587,"watchers":3212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/5394"},"html":{"href":"https://github.com/jruby/jruby/pull/5394"},"issue":{"href":"https://api.github.com/repos/jruby/jruby/issues/5394"},"comments":{"href":"https://api.github.com/repos/jruby/jruby/issues/5394/comments"},"review_comments":{"href":"https://api.github.com/repos/jruby/jruby/pulls/5394/comments"},"review_comment":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jruby/jruby/pulls/5394/commits"},"statuses":{"href":"https://api.github.com/repos/jruby/jruby/statuses/3c72e1f7baae7449d99e054702ac651aad2fa117"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"headius"}}