From: Jeremy Bopp Date: 2013-01-12T00:02:54+09:00 Subject: Re: How Ruby environment varibles work in realtime program? On 01/11/2013 08:54 AM, Joel Pearson wrote: > Oops, forgot the dollar signs. FYI that's a single line of code, it gets > put onto 2 lines by a line character limit on the forum. > > [$DLN_LIBRARY_PATH, $HOME, $LOGDIR, $RUBYOPT, $RUBYSHELL].each {|var| > puts var } > > When I run that in IRB they all come out as nil, presumably because in > that environment they aren't set. You're in Ruby here, not bash, so those names are global variable references for variables that haven't been defined. Therefore they default to nil. See my earlier reply for what you really intended to do. :-) -Jeremy