Allowing a character through Addressable::URI unescaped

I have some code which used to work a few months ago but appears to have
broken since then. It’s a URI builder which uses the pipe “|” character
as a separator for multiple values.

I use Addressable::URI.parse( my_uri )

I used to get a uri containing:
&num=value1|value2|value3

But now I’m getting:
&num=value1%7Cvalue2%7Cvalue3

How can I permit the pipe character specifically to go through URI
unescaped?

Aha! I went digging through the source code, which led me to a specific
section of the documentation, and finally I found this:

Addressable::URI::CharacterClasses::UNRESERVED << ‘|’

Now it works.

You’re right, changing that back makes no difference. Perhaps there was
a network failure which was fixed at the same time as I tried unescaping
that character.

On Thu, Jul 18, 2013 at 1:01 PM, Joel P. [email protected]
wrote:

Aha! I went digging through the source code, which led me to a specific
section of the documentation, and finally I found this:

Addressable::URI::CharacterClasses::UNRESERVED << ‘|’

Now it works.

Why do you want to change that? Both ways should work properly. It’s
like
with entities in XML if the character is in the char set and not a
special
character like & or < both representations are exactly equivalent.

Cheers

robert