From: Robert Klemme Date: 2010-05-19T20:20:27+09:00 Subject: Re: check if a file is already required ? 2010/5/19 Maciej Szatanik : > I made a GUI in wxruby to run ruby/watir test cases/test sets. Framework > has numerous of modules and global variables, which i can't require on > the start of the application. Why? > i figured out that i can just 'load' files, but there is a problem with > global variables. i can load most of files, tho i still have problems > with few others. What problems do you have? > my question is can i, and i i can - how do it unerquire files or check > are they already required. require checks that for you and ensures that a file is loaded only once. > meanwhile i'll try to move global variables to other files, which i > already require. I don't have a clear picture of your problem. Maybe refactoring global constants into other files that are required helps? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/