Skip to content

Prepending a module to a subclass changes it representation in the superclass#subclasses array #8121

@nagaroni

Description

@nagaroni

If we prepend a module to a class B that inherit from A, and then call A.subclasses the returned value does not return the correct class representation.

Environment Information

  • jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae27 OpenJDK 64-Bit Server VM 25.402-b06 on 1.8.0_402-b06 +jit [x86_64-linux]
  • Operational System (docker): Linux f01595e3f50e 6.1.0-17-amd64 break script engine #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

We shouldn't change the class representation in the Class#subclasses when a module is prepended

Actual Behavior

image

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