Skip to content

Addressable::Template#match raises Addressable::URI::InvalidURIError on invalid string #414

@ojab

Description

@ojab
> Addressable::Template.new('https://{domain}').match('x;x:x')
# => …/gems/addressable-2.7.0/lib/addressable/uri.rb:901:in `scheme=': Invalid scheme format: x;x (Addressable::URI::InvalidURIError)

Not sure if it's a bug, but I don't see that .match could raise documented anywhere and IMHO there is an expectation to have nil on any data that doesn't match the template, not only on valid URIs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions