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?

···

--
Posted via http://www.ruby-forum.com/.

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.

···

--
Posted via http://www.ruby-forum.com/.

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.

···

--
Posted via http://www.ruby-forum.com/.

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

···

On Thu, Jul 18, 2013 at 1:01 PM, Joel Pearson <lists@ruby-forum.com> 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.

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/