lib/dns-sd/service_instance.rb in dns-sd-0.1.0 vs lib/dns-sd/service_instance.rb in dns-sd-0.1.1
- old
+ new
@@ -67,11 +67,12 @@
#
def data
{}.tap do |data|
cached_resources(@fqdn, Resolv::DNS::Resource::IN::TXT).each do |rr|
rr.strings.each do |s|
- s =~ /\A([^=]+)(=(.*))?$/
- data[$1.to_sym] = $3
+ if s =~ /\A([^=]+)(=(.*))?$/
+ data[$1.to_sym] = $3
+ end
end
end
end
end