ruby-docx / docx

a ruby library/gem for interacting with .docx files
MIT License
431 stars 170 forks source link

Remove monkey patching on Module #130

Closed pjsk-stripe closed 1 year ago

pjsk-stripe commented 1 year ago

We use this gem and one particular issue we're experiencing comes from this monkey patch which adds activesupport-like delegators directly onto Module which mutates basically everything in our codebase by nature of code inheriting Class.

It looks like this monkeypatch only exists to support two separate delegate calls supporting four separate methods.

This PR replaces those delegates with regular ol' ruby methods and allows us to delete the monkeypatch (along with 100+ lines of code)

This fixes https://github.com/ruby-docx/docx/issues/131

✅ Tests pass in this new configuration.