aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-09-13 20:28:01 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-09-13 20:28:01 +0100
commita17027d13a48e1e64b14a28e7d58e341812f8cb4 (patch)
tree09699984d7a4f612689f19e3e0ccb663ae207d3f /activesupport
parent96055414d6197b9705e408c17236f79372a007e5 (diff)
downloadrails-a17027d13a48e1e64b14a28e7d58e341812f8cb4.tar.gz
rails-a17027d13a48e1e64b14a28e7d58e341812f8cb4.tar.bz2
rails-a17027d13a48e1e64b14a28e7d58e341812f8cb4.zip
Merge docrails
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/array/grouping.rb12
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, '&nbsp;') {|g| p g}
+ # %w(1 2 3).in_groups_of(2, '&nbsp;') {|group| p group}
# ["1", "2"]
# ["3", "&nbsp;"]
#
- # %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, '&nbsp;') {|g| p g}
+ # %w(1 2 3 4 5 6 7).in_groups(3, '&nbsp;') {|group| p group}
# ["1", "2", "3"]
# ["4", "5", "&nbsp;"]
# ["6", "7", "&nbsp;"]
#
- # %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"]