Closed wconrad closed 9 years ago
Hi Wayne,
I see you point. It makes sense to keep the core_extensions separate, I haven't really thought that through all that well. I'd go with your first suggestion, even though it breaks the current interface. It seems like a right thing to do.
Sounds good. If you like, I'll cook up a pull request.
Sorry, I didn't notice that you've done it already. Excellent, and thanks!
What would you say to making it possible to use word_wrap without it monkey patching String?
Background: I prefer to avoid, or at least minimize, gems that monkey patch core classes. It can get ugly in a hurry as the program grows and starts including other libraries that also monkey patch core classes.
I can think of a few ways to go, if you wanted to allow this. One would be to make the monkey-patch be omitted by:
and put into a piece you could require separately, if you wanted it:
This is a breaking API change. The other way, which is not a breaking API change, is to make the monkey patch be included, as it is now, by:
But omitted by, for example:
What do you think? Good idea? If so, how would you like it to work?