Project

General

Profile

Actions

Bug #12215

closed

URI::HTTP.new example is incorrect

Added by mcdickenson (Matt Dickenson) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.3.0-dev
[ruby-core:74540]

Description

On this page (http://ruby-doc.org/stdlib-2.3.0/libdoc/uri/rdoc/URI/HTTP.html) the example for URI::HTTP.new will result in an error (ArgumentError: wrong number of arguments (given 7, expected 9..11)).

A working example (2.3.0-dev) is: uri = URI::HTTP.new('http', nil, "www.example.com", nil, nil, "/path", nil, "query", 'fragment').

Updated by shevegen (Robert A. Heiler) about 8 years ago

You are right.

uri = URI::HTTP.new('http', nil, "www.example.com", nil, "/path", "query", 'fragment')

Triggers the error. Should be changed.

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 8 years ago

  • Status changed from Open to Closed

Applied in changeset r54257.


fix URI::HTTP.new example

  • lib/uri/http.rb (URI::HTTP#initialize): [DOC] fix example,
    missing mandatory arguments. [ruby-core:74540] [Bug #12215]

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED

ruby_2_1 r54395 merged revision(s) 54257.

Updated by nagachika (Tomoyuki Chikanaga) about 8 years ago

  • Backport changed from 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: REQUIRED

Backported into ruby_2_2 branch at r54427.

Updated by naruse (Yui NARUSE) about 8 years ago

  • Backport changed from 2.1: DONE, 2.2: DONE, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: DONE

ruby_2_3 r54550 merged revision(s) 54257.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0