Skip to content

Conversation

johnnyshields
Copy link
Contributor

@johnnyshields johnnyshields commented Mar 5, 2023

This PR fixes deprecation warning logic to work correctly on Ruby 2.7 and earlier. PR #5489 didn't support it correctly for Ruby <= 2.7, and as a result Ruby 2.7/2.6 specs are failing on 8.1-stable branch.

As you can see in the PR, there are differences in Ruby 2.7 and earlier handle Module#prepend on modules. I've intentionally done if/else for the different Ruby versions so it will be easy to cleanup in the future.

@johnnyshields johnnyshields changed the title [READY FOR REVIEW] MONGOID-5509: Fix broken spec in Mongoid 8.1 branch [READY FOR REVIEW] MONGOID-5509: Fix deprecation logic broken on Ruby <= 2.7 on 8.1-stable branch Mar 5, 2023
@johnnyshields
Copy link
Contributor Author

johnnyshields commented Mar 15, 2023

@jamis can you merge in this one? My "Deprecation" feature is actually broken (does nothing) on Ruby 2.6 and 2.7 given differences of how Module#prepend works.

@jamis jamis changed the title [READY FOR REVIEW] MONGOID-5509: Fix deprecation logic broken on Ruby <= 2.7 on 8.1-stable branch MONGOID-5509 Fix deprecation logic broken on Ruby <= 2.7 on 8.1-stable branch Mar 15, 2023
@jamis jamis merged commit 90925a9 into mongodb:8.1-stable Mar 15, 2023
@jamis
Copy link
Contributor

jamis commented Mar 15, 2023

Good catch, @johnnyshields -- thanks for the quick fix!

@johnnyshields johnnyshields deleted the fix-8.1-specs branch March 16, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants