Age | Commit message (Collapse) | Author |
|
|
|
Conflicts:
lib/puppet/parser/functions/range.rb
spec/unit/puppet/parser/functions/range_spec.rb
|
|
This patch adds an optional "step" argument to the stdlib range()
function. There is no change to the default behavior of the function;
however, passing a numeric "step" argument invokes the Ruby Range#step
method, e.g.
range("0", "9", "2")
returns
[0,2,4,6,8]
|
|
Without this patch the specified behavior of strings that are numeric
only and zero padded is unclear and untested in the spec tests. This is
a problem because it's not clear that range('00', '10') will actually
return [ "0", "1", ..., "10" ] instead of [ "00", "01", ..., "10" ]
This patch addresses the issue by providing explicit test coverage. If
the string conversion behavior of puppet changes, this test will begin
to fail.
|
|
|
|
|