I did what you said. But see the output of mine.

kirti@kirti-Aspire-5733Z:~/ruby$ ruby test.rb
Inside test.rb before load
"doc is Just a String as an 'original' value"
Inside so.rb
#<Nokogiri::HTML::Document:0x481cfb4 name="document" 
children=[#<Nokogiri::XML::DTD:0x481ce74 name="html">, 
#<Nokogiri::XML::Element:0x481ccf8 name="html" 
children=[#<Nokogiri::XML::Element:0x481cbea name="body" 
children=[#<Nokogiri::XML::Element:0x481caaa name="div" 
children=[#<Nokogiri::XML::Text:0x481c992 "foo">]>]>]>]>
Inside test.rb after load with the wrap=true option
"doc is Just a String as an 'original' value"
Inside so.rb
#<Nokogiri::HTML::Document:0x481c3d4 name="document" 
children=[#<Nokogiri::XML::DTD:0x481c294 name="html">, 
#<Nokogiri::XML::Element:0x481c0d2 name="html" 
children=[#<Nokogiri::XML::Element:0x481d126 name="body" 
children=[#<Nokogiri::XML::Element:0x4815b92 name="div" 
children=[#<Nokogiri::XML::Text:0x4815a5c "foo">]>]>]>]>
Inside test.rb after load
#<Nokogiri::HTML::Document:0x481c3d4 name="document" 
children=[#<Nokogiri::XML::DTD:0x481c294 name="html">, 
#<Nokogiri::XML::Element:0x481c0d2 name="html" 
children=[#<Nokogiri::XML::Element:0x481d126 name="body" 
children=[#<Nokogiri::XML::Element:0x4815b92 name="div" 
children=[#<Nokogiri::XML::Text:0x4815a5c "foo">]>]>]>]>
kirti@kirti-Aspire-5733Z:~/ruby$

-- 
Posted via http://www.ruby-forum.com/.