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

Fix transliteration to default replacement char #362

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

romuloceccon
Copy link
Contributor

Commit f6a4294 introduced a bug where non-ASCII chars not present in
the transliteration map would be removed from the output, instead of
being replaced by the default replacement char, violating the behaviour
stated in the documentation:

I18n.transliterate("日本語")
# => ""         (should be "???")

This fixes the issue while preserving the optimization introduced by
that commit.

Commit f6a4294 introduced a bug where non-ASCII chars not present in
the transliteration map would be removed from the output, instead of
being replaced by the default replacement char, violating the
behavior stated in the documentation:

    I18n.transliterate("日本語")
    # => ""         (should be "???")

This fixes the issue while preserving the optimization introduced by
that commit.
@radar
Copy link
Collaborator

radar commented Feb 21, 2017

This is a perfect PR. I want to print it and frame it as an example to all PRs.

I'll look at merging it a little later on today.

@radar radar merged commit 96f6e70 into ruby-i18n:master Feb 22, 2017
@kmcphillips
Copy link

Thanks for this quick fix.

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.

3 participants