Skip to content

Commit

Permalink
Get rid of YARD error
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Feb 19, 2021
1 parent 115c56c commit 543cc2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rspec/mocks/verifying_double.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def respond_to?(message, include_private=false)
missing_method = ::BasicObject.instance_method(:method_missing)

unless missing_method.respond_to?(:bind_call) # < Ruby 2.7
# @private
def missing_method.bind_call(receiver, *args, &block)
bind(receiver).call(*args, &block)
end
Expand All @@ -30,6 +31,7 @@ def missing_method.bind_call(receiver, *args, &block)
# Tell whether the method call which caused `method_missing`
# was called in the private or public form, by using
# `NoMethodError#private_call?`.
# @private
def missing_method.private_call?(object, message)
bind_call(object, message)
rescue NoMethodError => e
Expand All @@ -42,6 +44,7 @@ def missing_method.private_call?(object, message)
else
missing_method = (defined?(::BasicObject) ? ::BasicObject : ::Object).new

# @private
def missing_method.private_call?(object, message)
object.instance_variable_get(:@__sending_message) == message
end
Expand Down

0 comments on commit 543cc2d

Please sign in to comment.