From: Thomas Hafner Date: 2009-04-23T07:40:07+09:00 Subject: hygienic startup file Hello, a startup file to be loaded by RUBYOPT should have minimal side effects. I guess, this pattern will do it: class << Object.new FOO = ... # will not override FOO if defined before BAR = ... # will introduce BAR intermediately ... # Use the constants above to do some wanted side effect on an # object hold by a global variable, e.g. $LOAD_PATH : $:.unshift(FOO, ...) end # no more BAR visible here Is there a canonical way to achive this kind of hygiene? Regards Thomas