I am working on a Nokogiri::XML::Document object and when I see t using puts , it is reflecting the change but the same change is not reflected in the xml file with which it is related.
doc = Nokogiri::XML(File.open("d.xml"))
#Modification in doc.....
puts doc 
#changes are reflected
but when I open d.xml, no changes