Many of the query regular expressions use ^ and $, which permit newlines in Ruby. We can use \A and \z instead. In addition, any address that began with "127" would return true on loopback_ip_address? These issues have been corrected in query.rb with tests.
Note: there are also several other instances of ^ and $ in regexes in the code. As these are mostly related to various provider implementations, I haven't reviewed if using \A and \z would be more appropriate for them.
Use \A and \z in regular expressions to avoid newline issues. Also, d…
…o not consider any address that begins with 127 to be a loopback IP.
Thanks for this!