aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2012-11-16 03:20:55 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2012-11-16 03:20:55 -0500
commit22edb664cf081485e4e37bf5a797890648126a79 (patch)
treeb10a74cf0fbc78d5b24f9e0be244fe75d9c8e064 /activesupport/lib/active_support
parent44f12bbba08071178ec256c03eecadacdf35dccf (diff)
downloadrails-22edb664cf081485e4e37bf5a797890648126a79.tar.gz
rails-22edb664cf081485e4e37bf5a797890648126a79.tar.bz2
rails-22edb664cf081485e4e37bf5a797890648126a79.zip
Use Integer#div instead of Integer#/ to avoid side effects from mathn
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/array/grouping.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/grouping.rb b/activesupport/lib/active_support/core_ext/array/grouping.rb
index f79b100b3b..97a25cd2e6 100644
--- a/activesupport/lib/active_support/core_ext/array/grouping.rb
+++ b/activesupport/lib/active_support/core_ext/array/grouping.rb
@@ -58,7 +58,7 @@ class Array
# size / number gives minor group size;
# size % number gives how many objects need extra accommodation;
# each group hold either division or division + 1 items.
- division = size / number
+ division = size.div number
modulo = size % number
# create a new array avoiding dup