From: yermej Date: 2008-02-13T02:30:03+09:00 Subject: Re: Ruby equivalent to source command On Feb 12, 10:11 am, Robert Klemme wrote: > A global is probably much more appropriate here. If the code you > source somehow generates configuration settings then maybe you can set > a global Hash that will receive values. It depends on the larger > context of what you want to achieve. In cases like this, I've found it helpful to define a method that returns the configuration hash: $ echo "def config; {:a => 2}; end" | ruby -e 'eval(ARGF.read, binding); puts config[:a]'