-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Hello :)
Describe the bug
Today we encountered a situation where two gems are patching the same core class with the same method. badum-ching
They Adyen gem and the aquarium gem are both patching the method to_camel_case into String.
While both seem to have the same intention, the behavior varies slightly regarding the first character.
One gem wants it as upper-case, the other one as lower-case.
We end up with the current exception: aquarium/aspects/advice.rb:281:in const_get': wrong constant name noAdviceChainNode (NameError)`
Notice the lower-case 'n' in the name of a const.
Expected behavior
The expected behavior would be to not have the method to_camel_case in the core String class at all. It would be best not to patch core classes at all within a gem. You never know who else might come up with the same idea for a method name.
Desktop (please complete the following information):
- ruby Version: 2.6.3
- adyen gem Version: 4.1.0
- aquarium gem Version: 0.7.1
Additional context
A quick search didn't reveal any usage of to_camel_case. Is it actually used? Can we simply remove it?
I'll also open an issue at the aquarium gem.
Best regards,
Eric