Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Request to remove monkeypatching on Module #131

Closed
pjsk-stripe opened this issue Mar 29, 2023 · 2 comments · Fixed by #130
Closed

Request to remove monkeypatching on Module #131

pjsk-stripe opened this issue Mar 29, 2023 · 2 comments · Fixed by #130

Comments

@pjsk-stripe
Copy link
Contributor

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!

#130

@satoryu
Copy link
Member

satoryu commented Mar 30, 2023

Thank you for opening this issue and your pull request!

@andreibondarev
Copy link

@satoryu Could you please cut a new gem release with this fix included? Thank you!! 🙏🏻

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants