Skip to content

Conversation

@dapi
Copy link

@dapi dapi commented Jan 27, 2015

No description provided.

Copy link
Author

Choose a reason for hiding this comment

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

There is no reason to cache regexp, because creation of it is very cheap

@elskwid
Copy link
Collaborator

elskwid commented Jan 30, 2015

Hi @dapi! Thank you for your pull request. I want 1.3 backwards compatible for the most part with the 1.2.x. The change to country detection breaks old code that relies on the code regexp.

# from this:
if string =~ country.country_code_regexp
# to this:
if string =~ country.country_detect_regexp

How about using the new country_detect_regexp if it exists and otherwise falling back to the country_code_regexp? That way we don't break any expectations. Would also be great to have the README updated about the new detect functionality.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants