Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and expose the original string that was sent to .parse #46

Open
twingly-mob opened this issue Oct 16, 2015 · 5 comments
Open

Save and expose the original string that was sent to .parse #46

twingly-mob opened this issue Oct 16, 2015 · 5 comments
Labels

Comments

@twingly-mob
Copy link
Member

We noticed that System.Uri in .NET saved the input string in a public property called "OriginalString". That sounded kind of smart, not sure we really need it, but still.

@twingly-mob twingly-mob changed the title Save and expose the original string that was sent to parse Save and expose the original string that was sent to #parse Oct 16, 2015
@twingly-mob twingly-mob changed the title Save and expose the original string that was sent to #parse Save and expose the original string that was sent to .parse Oct 16, 2015
@walro
Copy link
Contributor

walro commented Oct 16, 2015

Might be useful, especially when we normalize. Keeping the original encapsulated should be handy.

@jage
Copy link
Contributor

jage commented Oct 16, 2015

👍

@dentarg
Copy link
Collaborator

dentarg commented Oct 16, 2015

Sure

@dentarg
Copy link
Collaborator

dentarg commented Jan 25, 2017

https://www.rubytapas.com/2015/09/03/episode-338-error-value/ does this exact thing, also makes it appear in inspect (and freezes the object)

@dentarg
Copy link
Collaborator

dentarg commented Jan 25, 2017

https://www.rubytapas.com/2015/09/03/episode-338-error-value/ does this exact thing, also makes it appear in inspect (and freezes the object)

Ah, I was only thinking of Twingly::NullURL, but this issue is a bit broader. Still useful inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants