Skip to content

constant URI::HOST not defined (NameError) #134

@MarioRuiz

Description

@MarioRuiz

URI v 1.0.1
When already defined the constant HOST getting the error
constant URI::HOST not defined (NameError)

To reproduce this issue:

HOST = "http://www.ruby-lang.org/ja/"
require "uri"
uri = URI.parse(HOST)
puts uri.host

output:

/gems/3.2.0/gems/uri-1.0.1/lib/uri/common.rb:42:in `remove_const': constant URI::HOST not defined (NameError)

      remove_const(sym) if const_defined?(sym)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions