diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-05 16:35:05 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-05 16:35:05 +0200 |
commit | 393410b97f3937bd46d324a01c78086bea0c9e98 (patch) | |
tree | b01912ae9aa04a907cf28aa7f4ba2c0ac6da4383 /activesupport | |
parent | c480c1db1f302ab28a255c5423326e51d27ec5ed (diff) | |
parent | b867939ac4f191f1cacfd07703c1e8d48a6d25ba (diff) | |
download | rails-393410b97f3937bd46d324a01c78086bea0c9e98.tar.gz rails-393410b97f3937bd46d324a01c78086bea0c9e98.tar.bz2 rails-393410b97f3937bd46d324a01c78086bea0c9e98.zip |
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/grouping.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/grouping.rb b/activesupport/lib/active_support/core_ext/array/grouping.rb index dd1484f8fa..f782f8facf 100644 --- a/activesupport/lib/active_support/core_ext/array/grouping.rb +++ b/activesupport/lib/active_support/core_ext/array/grouping.rb @@ -7,16 +7,16 @@ module ActiveSupport #:nodoc: # Splits or iterates over the array in groups of size +number+, # padding any remaining slots with +fill_with+ unless it is +false+. # - # %w(1 2 3 4 5 6 7).in_groups_of(3) {|g| p g} + # %w(1 2 3 4 5 6 7).in_groups_of(3) {|group| p group} # ["1", "2", "3"] # ["4", "5", "6"] # ["7", nil, nil] # - # %w(1 2 3).in_groups_of(2, ' ') {|g| p g} + # %w(1 2 3).in_groups_of(2, ' ') {|group| p group} # ["1", "2"] # ["3", " "] # - # %w(1 2 3).in_groups_of(2, false) {|g| p g} + # %w(1 2 3).in_groups_of(2, false) {|group| p group} # ["1", "2"] # ["3"] def in_groups_of(number, fill_with = nil) @@ -42,17 +42,17 @@ module ActiveSupport #:nodoc: # Splits or iterates over the array in +number+ of groups, padding any # remaining slots with +fill_with+ unless it is +false+. # - # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|g| p g} + # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|group| p group} # ["1", "2", "3", "4"] # ["5", "6", "7", nil] # ["8", "9", "10", nil] # - # %w(1 2 3 4 5 6 7).in_groups(3, ' ') {|g| p g} + # %w(1 2 3 4 5 6 7).in_groups(3, ' ') {|group| p group} # ["1", "2", "3"] # ["4", "5", " "] # ["6", "7", " "] # - # %w(1 2 3 4 5 6 7).in_groups(3, false) {|g| p g} + # %w(1 2 3 4 5 6 7).in_groups(3, false) {|group| p group} # ["1", "2", "3"] # ["4", "5"] # ["6", "7"] |