aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2014-01-29 15:42:07 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2014-02-05 16:53:02 -0500
commit13d2696c10726afecd393753fcac88c5a9907d8c (patch)
tree9a505cd8dc1a66b1afbf04e324fb6597c7563f20 /activesupport/lib/active_support
parentd37f395be86d131d0218dadd189771f99b06874f (diff)
downloadrails-13d2696c10726afecd393753fcac88c5a9907d8c.tar.gz
rails-13d2696c10726afecd393753fcac88c5a9907d8c.tar.bz2
rails-13d2696c10726afecd393753fcac88c5a9907d8c.zip
Return sized enumerator from Batches#find_each
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index 4501b7ff58..a2dec41c87 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -35,7 +35,7 @@ module Enumerable
if block_given?
Hash[map { |elem| [yield(elem), elem] }]
else
- to_enum :index_by
+ to_enum(:index_by) { size }
end
end