dry-rb / dry-effects

Algebraic effects in Ruby
https://dry-rb.org/gems/dry-effects/
MIT License
112 stars 20 forks source link

Fix a compatibility issue with active_support Object#with monkey patching #90

Closed tallica closed 5 months ago

tallica commented 6 months ago

Fixes a compatibility issue with ActiveSupport monkey patching Object#with: https://github.com/rails/rails/blob/v7.1.3/activesupport/lib/active_support/core_ext/object/with.rb

Example error:

NoMethodError:
  undefined method `payload=' for #<Dry::Effects::Effect type=:resolve name=:resolve payload=[] keywords={}>
Tyflomate commented 6 months ago

Same issue here ! Thanks for the temp patch !

flash-gordon commented 5 months ago

Sorry for the delay, I made a fix in the main branch, and I'll give it a try in one project of mine where I'm fortunate to have activesupport in dependencies. Once the checks are complete, I'll release a new version. Thank you for heads-up

flash-gordon commented 5 months ago

0.4.1 is out, it works for me