rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.07k stars 161 forks source link

Fixed Object#with conflict with ActiveSupport 7.1 #687

Closed rykov closed 3 months ago

rykov commented 8 months ago

ActiveSupport 7.1 defines Object#with that interferes with ROM. This PR fixes it.

We use define_method/undef_method sequence due to uncertain load order. The method needs to be defined for undef_method to mark a method as undefined. This solution ensures the fix works whether ActiveSupport is loaded before or after ROM.

Fixes #684

bendangelo commented 3 months ago

Can this get merged?

solnic commented 3 months ago

This needs to be reworked on top of release-5.3 branch so that we could release it.

flash-gordon commented 3 months ago

I'll address it today

flash-gordon commented 3 months ago

@rykov I fixed it in rom-core 5.3.1. It seems to work for me, can you please test it out for yourself?

bendangelo commented 3 months ago

It's fixed on my end. thanks

ricardopacheco commented 3 months ago

It's fixed for me too! thank you

flash-gordon commented 3 months ago

thanks folks, I'll close it then

rykov commented 3 months ago

@flash-gordon It works for me as well. Thank you for the fix.