From 95cad83ae00fd894e660c91cd3addcf907d39684 Mon Sep 17 00:00:00 2001 From: Freddy Chu Date: Fri, 17 Apr 2015 17:56:46 +0800 Subject: [PATCH] fix null on record[:name] --- lib/fog/aws/requests/dns/list_resource_record_sets.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/requests/dns/list_resource_record_sets.rb b/lib/fog/aws/requests/dns/list_resource_record_sets.rb index 883106dc0..243b19f5d 100644 --- a/lib/fog/aws/requests/dns/list_resource_record_sets.rb +++ b/lib/fog/aws/requests/dns/list_resource_record_sets.rb @@ -61,7 +61,7 @@ module Fog class Mock def list_all_records(record, zone, name) [].tap do |tmp_records| - tmp_records.push(record) if name.nil? || (!record[:name].nil? && record[:name].gsub(zone[:name],"") >= name) + tmp_records.push(record) if !record[:name].nil? && ( name.nil? || record[:name].gsub(zone[:name],"") >= name) record.each do |key,subr| if subr.is_a?(Hash) && key.is_a?(String) && key.start_with?(Fog::DNS::AWS::Mock::SET_PREFIX)