Fix for issue 7256: Undefined constants when including a module that has been prepended
Fixes https://github.com/jruby/jruby/issues/7256
@evaniainbrooks can you swap this from master to jruby-9.3? If github has a UI which allows me to make that change I cannot find it :)
I did kick it off against master anyways to also approve CI run since you are first time contributor.
I added @headius for reviewing this. I approve this but it is mildly scary stuff in possible impact so we should double up on the review. I think the PR is intuitive that the wrappers we make for include/prepend don't contain their own constants. So we should be asking something for it and I believe origin is correct. The actual vocabulary for this has always been confusing. Last year I did a bunch of work on fixing some issues in prepend and I already forgot.
@evaniainbrooks This is a pretty deep-level sort of fix. We appreciate the PR!
Thank you for the feedback @enebo
I re-created this PR against the jruby-9.3 branch here: https://github.com/jruby/jruby/pull/7302