From: Christian Boos Date: 2001-12-21T23:29:08+09:00 Subject: [ruby-talk:29224] Re: Constant loss of memory with Kernel::load in a loop Hi, > -----Original Message----- > From: nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net] > Sent: Friday, December 21, 2001 3:05 PM > To: ruby-talk ML > Subject: [ruby-talk:29220] Re: Constant loss of memory with Kernel::load > in a loop > > > > I made the assumption that the distinction between those two cases > > could also match the one already existing between load(f) and > load(f,true) > > (the load under an anonymous module). > > but don't guess the assumption is true. > If you don't like merging the two concepts, fine. We just need another way to specify we are in the second case. A 'load_tmp' function for example. > > It doesn't pass the following test (modified [ruby-talk:29203]). > > i = 0 > loop { > fn = format("/tmp/%d.rb", i += 1) > open(fn, "w") {} ># load fn load fn, true # or, at your option: load_tmp fn > File.unlink fn > } > Works. -- Christian