On Fri, Jan 11, 2013 at 3:54 PM, Joel Pearson <[email protected]> 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.

These are global variables and not environment variables!  Please see
Jeremy's reply for how to access environment variables.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to