lib/spf/model.rb in spf-0.0.19 vs lib/spf/model.rb in spf-0.0.20

- old
+ new

@@ -163,11 +163,11 @@ def parse_ipv6_address(required = false) if @parse_text.sub!(/(#{IPV6_ADDRESS_PATTERN})(?=\/|$)/x, '') @ip_address = $1 elsif required error(SPF::TermIPv6AddressExpected.new( - "Missing required IPv6 address in '#{@text}'")) + "Missing or invalid required IPv6 address in '#{@text}'")) end @ip_address = @parse_text.dup unless @ip_address end def parse_ipv6_prefix_length(required = false) @@ -472,10 +472,10 @@ @ip_netblocks << @ip_network if IP === @ip_network end def params return nil unless @ip_network - result @ip_network if String === @ip_network + return @ip_network if String === @ip_network params = @ip_network.to_addr params += '/' + @ip_network.pfxlen.to_s if @ip_network.pfxlen != self.default_ipv6_prefix_length return params end