Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
2
-
Platform Server 2014-11-12, Platform Server 2014-11-26, Platform Server 2014-12-17
Description
After having had a discussion about this on the puppet-dev mailing list it is clear that those who voiced an opinion want puppet to be explicit about string/numbers and not do automatic conversion. This because of the various problems with strings recognized and compared as numbers in situations where this is clearly the wrong thing to do.
Examples '3.10' == '3.1' is true since they are compared as numbers.
The implementation should:
- treat instance of String == instance of Number to always be false
- raise error if comparing <, >, <=, >= with String / Number
- (and obviously) never automatically convert a String to a Number
- Adhere to the same rules in case, select, and in operators
The work in this ticket also includes updating the specification.