Commit c4264dd Matthew Lemieux
committed
1 parent 134eacb commit c4264dd Copy full SHA for c4264dd
File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def sanitized_text
23
23
text . split ( /\s *,\s */ ) . join ( ',' )
24
24
end
25
25
else
26
- text . strip
26
+ text . to_s . strip
27
27
end
28
28
end
29
29
Original file line number Diff line number Diff line change @@ -5,10 +5,14 @@ class QueryTest < GeocoderTestCase
5
5
6
6
def test_detect_ipv4
7
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?
8
10
end
9
11
10
12
def test_detect_ipv6
11
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
+ assert Geocoder ::Query . new ( ip ) . ip_address?
12
16
end
13
17
14
18
def test_detect_non_ip_address
You can’t perform that action at this time.
0 commit comments