Current implementation of Selector#merge! does not support selecting value preference for duplicate keys.
Hash#merge! accomplish this by passing a block which is only called when keys are duplicated and return the desired value.
The thing is, I'm not using Selector#merge! directly but through _ActiveSupport#reversemerge! which is usefull to me to create custom filters but I'm not sure about manipulating selector hash is a good practice.
So, what do you think? It should be fine to support this or should I change my own implementation?
Current implementation of Selector#merge! does not support selecting value preference for duplicate keys.
Hash#merge! accomplish this by passing a block which is only called when keys are duplicated and return the desired value.
The thing is, I'm not using Selector#merge! directly but through _ActiveSupport#reversemerge! which is usefull to me to create custom filters but I'm not sure about manipulating selector hash is a good practice.
So, what do you think? It should be fine to support this or should I change my own implementation?
Thanks!