1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Nobuyoshi Nakada 2020-05-05 23:23:39 +09:00
parent f0b5629c8c
commit e04418bb16
2 changed files with 5 additions and 0 deletions

View file

@ -118,6 +118,7 @@ module URI
# Private method to cleanup +dn+ from using the +path+ component attribute.
def parse_dn
raise InvalidURIError, 'bad LDAP URL' unless @path
@dn = @path[1..-1]
end
private :parse_dn

View file

@ -95,6 +95,10 @@ class TestLDAP < Test::Unit::TestCase
u.select(:scheme, :host, :not_exist, :port)
end
end
def test_parse_invalid_uri
assert_raise(URI::InvalidURIError) {URI.parse("ldap:https://example.com")}
end
end