diff options
author | Bradford Folkens <bfolkens@gmail.com> | 2008-07-10 11:37:07 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-27 23:48:54 -0700 |
commit | 293f99700d6f2388ea5c504d706651ff3044d733 (patch) | |
tree | 65595268b26911c1f69c50706899b1849785e4c2 /activesupport/lib | |
parent | 96c6fe084228d570dad80e3100830edb2bc0448d (diff) | |
download | rails-293f99700d6f2388ea5c504d706651ff3044d733.tar.gz rails-293f99700d6f2388ea5c504d706651ff3044d733.tar.bz2 rails-293f99700d6f2388ea5c504d706651ff3044d733.zip |
Reinstate Range#step default argument.
[#595 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/range/blockless_step.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/range/blockless_step.rb b/activesupport/lib/active_support/core_ext/range/blockless_step.rb index 39dac85636..6fa1eb5bee 100644 --- a/activesupport/lib/active_support/core_ext/range/blockless_step.rb +++ b/activesupport/lib/active_support/core_ext/range/blockless_step.rb @@ -8,7 +8,7 @@ module ActiveSupport #:nodoc: end if RUBY_VERSION < '1.9' - def step_with_blockless(value, &block) + def step_with_blockless(value = 1, &block) if block_given? step_without_blockless(value, &block) else @@ -18,7 +18,7 @@ module ActiveSupport #:nodoc: end end else - def step_with_blockless(value, &block) + def step_with_blockless(value = 1, &block) if block_given? step_without_blockless(value, &block) else |