Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
PUP 4.0.0
-
None
-
None
-
1
-
Language 2015-04-29, Language 2015-05-13
-
Bug Fix
Description
Since 4.0.0 it is possible to give a Regexp type to split to specify the pattern to split on. Since a Regexp without a parameter (pattern) has an undef/nil pattern, and this is given directly to the Ruby String#split method, it is taken to mean "split on whitespace".
This is different that if the pattern is set to the an empty string, or to an empty regular expression where the split is made on "nothing" - i.e. between every character.
The most reasonable would be if Regexp and Regexp[''] results in the same regular expression while as types they are different since Regexp accepts any other Regexp, while Regexp[''] only accepts that specific regexp.
QA Risk Analysis
Probability | Medium (how frequently do people split with Regexp?) |
Impact | Low (unexpected results but no data loss) |
Risk Level | Medium |
Test Level | Spec |