提交 ba5591f2 编写于 作者: M Marcel Molina

Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 fb7807e2
*SVN*
* Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170. [sergeykojin@gmail.com, Marcel Molina Jr.]
* Ensure Chars#tidy_bytes only tidies broken bytes. Closes #6397 [Manfred Stienstra]
* Add 'unloadable', a method used to mark any constant as requiring an unload after each request. [Nicholas Seckar]
......
module Enumerable #:nodoc:
module Enumerable
# Collect an enumerable into sets, grouped by the result of a block. Useful,
# for example, for grouping records by date.
#
......@@ -19,7 +19,7 @@ def group_by
(groups[yield(element)] ||= []) << element
groups
end
end
end if RUBY_VERSION < '1.9'
# Calculates a sum from the elements. Examples:
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册