{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/3008","labels_url":"https://api.github.com/repos/jruby/jruby/issues/3008/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/3008/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/3008/events","html_url":"https://github.com/jruby/jruby/issues/3008","id":83040178,"number":3008,"title":"Module#included is private when called with super","user":{"login":"ahawkins","id":48928,"avatar_url":"https://avatars.githubusercontent.com/u/48928?v=3","gravatar_id":"","url":"https://api.github.com/users/ahawkins","html_url":"https://github.com/ahawkins","followers_url":"https://api.github.com/users/ahawkins/followers","following_url":"https://api.github.com/users/ahawkins/following{/other_user}","gists_url":"https://api.github.com/users/ahawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/ahawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahawkins/subscriptions","organizations_url":"https://api.github.com/users/ahawkins/orgs","repos_url":"https://api.github.com/users/ahawkins/repos","events_url":"https://api.github.com/users/ahawkins/events{/privacy}","received_events_url":"https://api.github.com/users/ahawkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-31T08:36:34Z","updated_at":"2015-06-02T17:02:52Z","closed_at":null,"body":"I came across this issue when trying out one of my libraries on jruby 9000 pre2. The relevant source code is here: https://github.com/Saltside/thrift-base64-ruby/blob/master/lib/thrift/base64.rb#L22-51\r\n\r\nNote the comment about using `prepend` and `included`. The code fails on 9000.pre2 like so:\r\n\r\n```\r\nNoMethodError: private method `included' called for Thrift::Struct:Module\r\n          included at /usr/local/bundle/gems/thrift-base64-0.1.1/lib/thrift/base64.rb:35\r\n           include at org/jruby/RubyModule.java:2408\r\n```\r\n\r\nI could remove my work around and use `included` like normal, but it seems strange that a method would change scope when invoked with `super`.\r\n\r\nThis is easily to replicate. Clone that library and run the tests on 9000.pre2."},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/108016804","html_url":"https://github.com/jruby/jruby/issues/3008#issuecomment-108016804","issue_url":"https://api.github.com/repos/jruby/jruby/issues/3008","id":108016804,"user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","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},"created_at":"2015-06-02T17:02:52Z","updated_at":"2015-06-02T17:02:52Z","body":"Simple reproduction:\r\n\r\n```ruby\r\nmodule A\r\n  def included(base)\r\n    super\r\n  end\r\nend\r\n\r\nmodule B\r\n  class << self\r\n    prepend A\r\n  end\r\nend\r\n\r\nclass C\r\n  include B\r\nend\r\n```"}}