Skip to content

Changing method visibility changes behavior for module-inherited methods #7240

@NC-piercej

Description

@NC-piercej

Environment Information

  • JRuby 9.3.4.0
  • jruby:9.3.4.0-jre11 docker image

Expected Behavior

Here is an example of how CRuby behaves (2.7.5):

Screen Shot 2022-06-09 at 11 26 51 AM

As we can see, method visibility changed, but behavior did not.

Actual Behavior

Here is what happens for the same example on JRuby:

Screen Shot 2022-06-09 at 11 23 27 AM

Here, the behavior of the method unexpectedly changed after it was made public, preferring the signature of the first module that was overridden by the signature of the second.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions