Environmental variables in Ruby 1.8.5

C

Chris Gehlker

I get:
irb(main):001:0> ENV.keys.size
=> 15
irb(main):002:0> ENV.keys[0..14]
=> ["TERM_PROGRAM", "TERM", "SHELL", "CLICOLOR",
"TERM_PROGRAM_VERSION", "USER", "__CF_USER_TEXT_ENCODING", "PATH",
"RI", "PWD", "SHLVL", "HOME", "LOGNAME", "SECURITYSESSIONID", "_"]

Which is a smaller set of environmental variables quite different
than what is described in the Pickaxe Book. Did the Ruby powers trim
them? Just curious.
 
K

Kent Sibilev

$ env | wc -l
23
$ ruby -e 'puts ENV.size'
23


I get:
irb(main):001:0> ENV.keys.size
=> 15
irb(main):002:0> ENV.keys[0..14]
=> ["TERM_PROGRAM", "TERM", "SHELL", "CLICOLOR",
"TERM_PROGRAM_VERSION", "USER", "__CF_USER_TEXT_ENCODING", "PATH",
"RI", "PWD", "SHLVL", "HOME", "LOGNAME", "SECURITYSESSIONID", "_"]

Which is a smaller set of environmental variables quite different
than what is described in the Pickaxe Book. Did the Ruby powers trim
them? Just curious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top