test/test_file.rb in geoip-1.5.0 vs test/test_file.rb in geoip-1.6.1
- old
+ new
@@ -10,8 +10,8 @@
if ip >= (1<<32)
(('%032X'%ip).scan(/..../)*':').sub(/\A(0000:)+/, '::') # An IPv6 address
else
'%d.%d.%d.%d' % [ip].pack('N').unpack('C4')
end
- puts "#{ip_str}\t#{val.to_hash.to_a.sort.map{|n,v| "#{n}=#{v.inspect}"}*', '}"
+ puts "#{ip_str}\t#{val ? val.to_hash.to_a.sort.map{|n,v| "#{n}=#{v.inspect}"}*', ' : 'Unassigned'}"
end
end