Skip to content
Browse files

Strict regexp

  • Loading branch information...
1 parent 2b60a6b commit 9442c3e8830b85072d8ea2cc31fb4cac144d7649 @rafaelfranca rafaelfranca committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_adapters/connection_specification.rb
View
4 activerecord/lib/active_record/connection_adapters/connection_specification.rb
@@ -63,8 +63,8 @@ def resolve_hash_connection(spec) # :nodoc:
end
# For DATABASE_URL, accept a limited concept of ints and floats
- SIMPLE_INT = /^\d+$/
- SIMPLE_FLOAT = /^\d+\.\d+$/
+ SIMPLE_INT = /\A\d+$\z/
@lexmag
lexmag added a note

Is $ still necessary?

@rafaelfranca Ruby on Rails member

:poop: I thought I removed. Mind to open a pull request?

@lexmag
lexmag added a note

I will not. It's just a typo.

@rafaelfranca Ruby on Rails member

Ok. I'll fix. Thanks to point :heart:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ SIMPLE_FLOAT = /\A\d+\.\d+\z/
def connection_url_to_hash(url) # :nodoc:
config = URI.parse url

0 comments on commit 9442c3e

Please sign in to comment.
Something went wrong with that request. Please try again.