You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(PUP-4698) Change fqdn_rand's return type to Integer
Before this, fqdn_rand always returned a String. That is not the best
choice for a numeric value now that the evaluator is aware of different
data types as comparissons will typically be wrong (since '2' > '19'
when compared leicographically).
This fix adds a utility method that returns an integer version while the
old utility method producing a string is retained for those that use
Puppet as an API. The function now uses the integer version of this
utility method.
A test is added that asserts that an Integer is produced.
At some point it would be beneficial to reimplement the function using
the 4.x function API as it will simply raise a generic error if given
input of the wrong type. It will also magically change a floating point
input value to integer.
0 commit comments