mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
d3e0a9f110
commit
69d91cd6a6
1 changed files with 5 additions and 1 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue