Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Done
-
None
-
None
-
None
-
1
-
Language 2015-04-01
Description
The 3.x in operator was not well specified and there were several undefined behaviors. This relates to (but is not limited to)
- string / numeric automatic conversions
- applying regular expressions to non string values causing auto conversion
- confusion over comparisons between empty string / undef / (and internal nil values)
- in operator not using case independent comparisons
Code using the `in` operator should be reviewed by users and expectations matched against the now specified behavior.
Add a MIGRATE4_REVIEW_IN_EXPRESSION with the text "Please review the expectations of using this in-expression against the 4.x specification (3.x. evaluation is undefined for many corner cases)".
Add a method report_in_expression(o) to MigrationChecker and add a call to (always) report the in expression. Call the method from the evaluator's eval_InExpression.
(Rationale: It is close to impossible to detect all the corner cases where the result will be different)
(Add method stubs to the MigrationChecker in the puppet repository and the concrete methods to the implementation in the module created in PUP-4149).
Attachments
Issue Links
- links to