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

Base64#urlsafe_encode now works as in ruby, fixed #3394 #3403

Merged
merged 5 commits into from
Oct 9, 2016

Conversation

kostya
Copy link
Contributor

@kostya kostya commented Oct 9, 2016

No description provided.

@@ -149,11 +149,8 @@ module Base64
# Alphabet" in RFC 4648.
#
# The alphabet uses '-' instead of '+' and '_' instead of '/'.
#
# The `padding` parameter defaults to false. When true, enough `=` characters
# are added to make the output divisible by 3.
def urlsafe_encode(data, io : IO)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have padding = true here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i want to remove padding option, and i thought this is not needed, but used in secure_random
https://github.com/crystal-lang/crystal/blob/master/src/secure_random.cr#L46

in io method, i not think it needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. We can always add it later if needed :-)

@asterite
Copy link
Member

asterite commented Oct 9, 2016

Looks good, thanks! I added a small question.

@asterite asterite merged commit 2da5008 into crystal-lang:master Oct 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants