diff --git a/lib/geocoder.rb b/lib/geocoder.rb index a4b52ac55bab3f091cec83fc9d649a322d848fed..3b8636cc6d2a24f4abc9483b47f162db424ea826 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -115,7 +115,7 @@ module Geocoder # dot-delimited numbers. # def ip_address?(value) - !!value.to_s.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) + !!value.to_s.match(/^(::ffff:)?(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) end ##