We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 134eacb + c4264dd commit 05ff71aCopy full SHA for 05ff71a
lib/geocoder/query.rb
@@ -23,7 +23,7 @@ def sanitized_text
23
text.split(/\s*,\s*/).join(',')
24
end
25
else
26
- text.strip
+ text.to_s.strip
27
28
29
test/unit/query_test.rb
@@ -5,10 +5,14 @@ class QueryTest < GeocoderTestCase
5
6
def test_detect_ipv4
7
assert Geocoder::Query.new("232.65.123.94").ip_address?
8
+ ip = IPAddr.new("232.65.123.94")
9
+ assert Geocoder::Query.new(ip).ip_address?
10
11
12
def test_detect_ipv6
13
assert Geocoder::Query.new("3ffe:0b00:0000:0000:0001:0000:0000:000a").ip_address?
14
+ ip = IPAddr.new("3ffe:0b00:0000:0000:0001:0000:0000:000a")
15
16
17
18
def test_detect_non_ip_address
0 commit comments