Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a "step" argument to range() #56

Merged
merged 1 commit into from
May 28, 2013

Conversation

hakamadare
Copy link
Contributor

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]

I've created ticket 13601
in Redmine to track this request.

-steve

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]
@kwilczynski
Copy link
Contributor

Hi,

+1

I've made some changes in the range function as per:

https://gist.github.com/2277148
https://gist.github.com/2277144
https://gist.github.com/2270106

I will add "step" to it as well :) Thanks for that!

KW

@hakamadare
Copy link
Contributor Author

ok, that looks AWESOME (especially the third gist)!

@kwilczynski
Copy link
Contributor

One think to mind -- this is not in the puppetlabs-stdlib yet :)

@puppetcla
Copy link

CLA Signed by hakamadare on 2012-01-17 21:00:00 -0800

@adrienthebo adrienthebo merged commit 4732676 into puppetlabs:master May 28, 2013
@adrienthebo
Copy link
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants