-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.2.1
-
Component/s: None
-
Labels:None
We have just tried to update our Mongoid version from 5.2.0 to 5.2.1, feeling that it would not cause any trouble.
Surprisingly, we had failures in all our Mongoid::Document classes that would use the Ruby core class Regexp without explicitly using ::Regexp, as it would now match Mongoid::Matchable::Regexp instead.
Mongoid::Document includes Composable that includes Matchable that adds Regexp.
You should add a warning with the release note of 5.2.1 that this new Regexp class now exists and that it is not backward compatible with code that might have been referencing the core Ruby Regexp class. People need to be warned about that.
I know that it is safer to always use ::Regexp anyway, but it is still a surprising change, simply upgrading from 5.2.0 to 5.2.1.
- is duplicated by
-
MONGOID-4450 Using Regexp query class in mongoid document context fails
- Closed