diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-06-04 09:53:59 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-06-04 09:53:59 +0900 |
commit | 69d91cd6a6a734ee1c383eac8c45e3cdc9f781b9 (patch) | |
tree | e8ced2600f1998954c0a4f3a22022a751a0db895 /activesupport/lib | |
parent | d3e0a9f11056c110b3a4bc0099da7ba165c0224f (diff) | |
download | rails-69d91cd6a6a734ee1c383eac8c45e3cdc9f781b9.tar.gz rails-69d91cd6a6a734ee1c383eac8c45e3cdc9f781b9.tar.bz2 rails-69d91cd6a6a734ee1c383eac8c45e3cdc9f781b9.zip |
Don't expose `Enumerable#_original_sum_with_required_identity` which is internal API [ci skip]
`:nodoc:` is specified, but unfortunately, it is exposed in the API doc.
http://edgeapi.rubyonrails.org/classes/Enumerable.html#method-i-_original_sum_with_required_identity
If the method of the `alias` destination is public, the specification of
`:nodoc:` does not seem to work.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/enumerable.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index 7713c52cb1..d87d63f287 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -7,11 +7,15 @@ module Enumerable # Enumerable#sum was added in Ruby 2.4, but it only works with Numeric elements # when we omit an identity. + # :stopdoc: + # We can't use Refinements here because Refinements with Module which will be prepended # doesn't work well https://bugs.ruby-lang.org/issues/13446 - alias :_original_sum_with_required_identity :sum # :nodoc: + alias :_original_sum_with_required_identity :sum private :_original_sum_with_required_identity + # :startdoc: + # Calculates a sum from the elements. # # payments.sum { |p| p.price * p.tax_rate } |