addressable
addressable copied to clipboard
Template#extract does not properly handle non-list expansion
template = Addressable::Template.new("http://{host}{/segments}/{?one,two,bogus}{#fragment}")
template.extract("http://example.com/a,b,c/?one=1&two=2#foo")
# => nil, should be a match
Match result should be:
{
"host" => "example.com"
"segments" => ["a", "b", "c"],
"one" => "1",
"two" => "2",
"bogus" => nil,
"fragment" => "foo"
}