Request to remove monkeypatching on Module
pjsk-stripe opened this issue · comments
Problem
Hi friends! This gem currently mutates Module
for all ruby code that requires this gem. This monkeypatching is causing a few issues in our codebase by defining delegate
on all ruby objects (well, anything that extends Module
, which is most things).
It seems this monkeypatch only exists to add two separate delegate
calls. Can we replace these with regular ruby methods so that this gem doesn't mutate Module
at runtime?
Solution
Replace delegate
calls with ruby methods which removes the necessity of the core_ext directory in this gem.
I opened a PR to fix this and it was relatively straight forward, happy to make any necessary changes!
Thank you for opening this issue and your pull request!
@satoryu Could you please cut a new gem release with this fix included? Thank you!! 🙏🏻