Skip to content

Make language comparisons case-insensitive - #41

Merged
DouweM merged 1 commit into
iain:masterfrom
glacials:master
May 3, 2014
Merged

DouweM merged 1 commit into
iain:masterfrom
glacials:master

Conversation

@glacials

Copy link
Copy Markdown

This changes language comparisons to be case insensitive, to follow RFC 3066 (2.1)!

@DouweM

DouweM commented Apr 30, 2014

Copy link
Copy Markdown
Collaborator

Hi @glacials,

Thanks for your contribution!

The relevant requirement is actually also in RFCs 2616 and 5646 which this gem strives to follow, respectively in sections 3.1 and 2.1.1, so we definitely want to incorporate this change.

Anyway, the change would need to be made to #compatible_language_from as well. If you make the change there, I'll gladly merge this!

@glacials

glacials commented May 1, 2014

Copy link
Copy Markdown
Author

There you go!

I also removed some try calls from the first commit by calling downcase earlier, before a nil is possible. Let me know if you'd rather have the efficiency of calling it later, or if you want me to reorganize the content of the commits.

@DouweM

DouweM commented May 1, 2014

Copy link
Copy Markdown
Collaborator

There's some more changes about efficiency I'd like to make, but your code is good to go. Combine the commits and I'll merge it and make those other changes myself!

@glacials

glacials commented May 1, 2014

Copy link
Copy Markdown
Author

Cool, done!

DouweM added a commit that referenced this pull request May 3, 2014
Make language comparisons case-insensitive
@DouweM
DouweM merged commit ed8a673 into iain:master May 3, 2014
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.

2 participants