brynary/rack-test — Issue #50: Cookie path is truncated
Author: goosmurf
Created: 2012-01-17 02:05:55+00:00
State: open

I noticed that https://github.com/brynary/rack-test/blob/master/lib/rack/test/cookie_jar.rb#L25 causes the URI path to be truncated.

irb(main):001:0> "/cookies/test".sub(/\/[^\/]*\Z/, "")
=> "/cookies"

I can have a go at fixing this (and related tests that may be broken) but I'm wondering if I'm missing something. What was the motivation behind the regexp?