It is common to forget to quote sequences of digits intended to be strings. This is particularly bad for the order feature of the concat module (and others with similar functionality). Users write 01, 02 etc instead of '01', '02' (the order is based on strings). This works up to 07, but if user writes 08 they get an "invalid octal" error, the order for the elements 01 to 07 is however not what user intended since they are numbers, and converted to strings to produce '1', to '7' which will sort them wrong.
The migration check is to flag all octal, hex and floating point values and warn that they are ambiguous. This will probably only result in few false positives as arithmetic on octal, hex and float values is done very infrequently (especially since File.mode now only accepts a string value).
Add MIGRATE4_AMBIGOUS_INTEGER to MigrationIssues with the text
Add MIGRATE4_AMBIGOUS_FLOAT to MigrationIssues with the text "This float value parses to an imprecise floating point value. Quote if a String value was intended (3.x bare word floating point numbers are strings)".
Add a method report_ambiguous_integer(o) to MigrationChecker and check if the semantic o is a LiteralInteger. Report if it does not have radix 10 (values in radix 10 are the same in string and integer converted to string form).
Add a method report_ambiguous_float(o) to MigrationChecker and always report (it is somewhat difficult to find the source form and compare if the float to string is different than the original string). (Stretch goal: get the locator and extract the source, compare the float converted to a string with to_s and report if different. And if implementing the stretch goal adjust the message text to show the different values).
Call the methods report_ambiguous_xxx from the checker4_0.rb. if the MigrationChecker is in effect. There is currently not checker methods for LiteralInteger, and LiteralFloat and these needs to be added - i.e.
(Add method stubs to the MigrationChecker in the puppet repository and the concrete methods to the implementation in the module created in