lib/nmap/xml.rb in ruby-nmap-0.9.1 vs lib/nmap/xml.rb in ruby-nmap-0.9.2

- old
+ new

@@ -37,11 +37,11 @@ @doc = document when IO, StringIO @doc = Nokogiri::XML(document) else @path = File.expand_path(document) - @doc = Nokogiri::XML(open(@path)) + @doc = File.open(@path) { |file| Nokogiri::XML(file) } end yield self if block_given? end @@ -58,10 +58,10 @@ # The newly created XML object. # # @since 0.8.0 # def self.parse(text,&block) - new(Nokogiri::XML(text), &block) + new(Nokogiri::XML(text),&block) end # # @deprecated Use {parse} instead. #