If you load it with the wrap=true then there's a separate enviroment
and there will be two distinct @doc and there's no way you can
"access" that modified doc that is inside the so.rb
If you load it without the wrap=true then it's like they are one
single script file and the contexts are the same. So if you change in
one place it will be changed everywhere else.

Abinoam Jr.

On Tue, Sep 24, 2013 at 6:32 PM, Love U Ruby <lists / ruby-forum.com> wrote:
> Abinoam Jr. wrote in post #1122322:
>> Could you repeat the test using the code bellow?
>
>> test.rb
>> =======
>> @doc = "doc is Just a String as an 'original' value"
>> puts "Inside test.rb before load"
>> p @doc #=> It renders that String
>>
>> load "./so.rb", true
>> puts "Inside test.rb after load with the wrap=true option"
>> p @doc #=> Still rendering a String
>>
>
> In this case how can we access the @doc of the loaded script?
>
> --
> Posted via http://www.ruby-forum.com/.