From: Mauricio Fernandez Date: 2006-06-06T05:26:52+09:00 Subject: Re: [PATCH] SCRIPT_LINES__ issue when loading a file more than once On Fri, May 19, 2006 at 06:46:05PM +0900, Mauricio Fernandez wrote: > When a file ("the same" or with changing contents) is loaded more than once, > its contents get appended to SCRIPT_LINES__[filename] repeatedly: > > $ cat tst.rb > SCRIPT_LINES__ = {} > 4.times{ load "foo.rb" } > p SCRIPT_LINES__["./foo.rb"] > $ cat foo.rb > a = 1 > $ ruby19 tst.rb > ["a = 1\n", "a = 1\n", "a = 1\n", "a = 1\n"] > $ ruby tst.rb > ["a = 1\n", "a = 1\n", "a = 1\n", "a = 1\n"] Does it work that way by design (WONTFIX) or is it just that nobody cares about SCRIPT_LINES__? -- Mauricio Fernandez - http://eigenclass.org - singular Ruby