add a "step" argument to range()#56
Merged
adrienthebo merged 1 commit intopuppetlabs:masterfrom May 28, 2013
Merged
Conversation
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]
Contributor
|
Hi, +1 I've made some changes in the range function as per: https://gist.github.com/2277148 I will add "step" to it as well :) Thanks for that! KW |
Contributor
Author
|
ok, that looks AWESOME (especially the third gist)! |
Contributor
|
One think to mind -- this is not in the puppetlabs-stdlib yet :) |
|
CLA Signed by hakamadare on 2012-01-17 21:00:00 -0800 |
Contributor
|
@hakamadare terribly sorry about the delay in getting this merged! We've been working through backlogged pull requests and getting everything merged in. summary: merged into master in 928c131; this should be released in the next major or minor release of puppetlabs-stdlib. Thanks again for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
returns
I've created ticket 13601
in Redmine to track this request.
-steve