Skip to content

Module#included is private when called with super #3008

@ahawkins

Description

@ahawkins

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

Note the comment about using prepend and included. The code fails on 9000.pre2 like so:

NoMethodError: private method `included' called for Thrift::Struct:Module
          included at /usr/local/bundle/gems/thrift-base64-0.1.1/lib/thrift/base64.rb:35
           include at org/jruby/RubyModule.java:2408

I could remove my work around and use included like normal, but it seems strange that a method would change scope when invoked with super.

This is easily to replicate. Clone that library and run the tests on 9000.pre2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions