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

- old
+ new

@@ -535,10 +535,11 @@ end def nested_record(server=nil, request=nil) return @nested_record if @nested_record authority_domain = self.domain(server, request) + return nil unless request sub_request = request.new_sub_request({:authority_domain => authority_domain}) return @nested_record = server.select_record(sub_request) end end @@ -866,10 +867,10 @@ mech_text = $1 mech_name = $2.downcase mech_class = self.mech_classes[mech_name.to_sym] exception = nil unless mech_class - exception = SPF::InvalidMech.new("Unknown mechanism type '#{mech_name}' in '#{@version_tag}' record") + exception = SPF::InvalidMechError.new("Unknown mechanism type '#{mech_name}' in '#{@version_tag}' record") error(exception) mech_class = SPF::Mech end term = mech = mech_class.new_from_string(mech_text, {:raise_exceptions => @raise_exceptions}) term.errors << exception if exception