class Pry::Method::Disowned

def method_missing(method_name, *args, &block)

rubocop:disable Style/MethodMissingSuper
Raise a more useful error message instead of trying to forward to nil.
def method_missing(method_name, *args, &block)
  if method(:name).respond_to?(method_name)
    raise "Cannot call '#{method_name}' on an undef'd method."
  end
  method = Object.instance_method(:method_missing).bind(self)
  method.call(method_name, *args, &block)
end