Project

General

Profile

Actions

Feature #9987

closed

method Net::HTTP methods private

Added by douglasfeitosa (Douglas Feitosa) almost 10 years ago. Updated almost 10 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
[ruby-core:63374]

Description

    def HTTP.start(address, *arg, &block) # :yield: +http+
      arg.pop if opt = Hash.try_convert(arg[-1])
      port, p_addr, p_port, p_user, p_pass = *arg
      port = https_default_port if !port && opt && opt[:use_ssl]
      http = new(address, port, p_addr, p_port, p_user, p_pass)

      if opt
        if opt[:use_ssl]
          opt = {verify_mode: OpenSSL::SSL::VERIFY_PEER}.update(opt)
        end
        http.methods.grep(/\A(\w+)=\z/) do |meth|
          key = $1.to_sym
          opt.key?(key) or next
          http.__send__(meth, opt[key])
        end
      end

      http.start(&block)
    end

method 'methods' in http(Net::HTTP) private when running in rake task.

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Description updated (diff)
  • Status changed from Open to Third Party's Issue

Why is it private?
Who does it?

Actions #2

Updated by zzak (zzak _) almost 10 years ago

  • Tracker changed from Bug to Feature

I also think this may be a feature

Actions

Also available in: Atom PDF

Like0
Like0Like0