From: Andrei Maxim Date: 2008-03-03T07:42:12+09:00 Subject: Re: How do I get the server name? On Mon, Mar 3, 2008 at 12:36 AM, Jano Svitok wrote: > On Sun, Mar 2, 2008 at 11:00 PM, Sebastian Hungerecker > wrote: > > Andrei Maxim wrote: > > > Since ENV is a hash > > > > No, it's not. > > >> ENV.is_a? Hash > > => false > > It quacks like a hash, so it must be a hash ;-) > Of course, it's not a real Hash instance, but you can work with it as > though it was a Hash. I was actually surprised to see that ENV.class returns Object. It certainly acts like a Hash so... > > ENV.each { |key, value| puts "#{lkey} - #{value}" } > > There's a typo: not #{lkey}, byt #{key} Right. Sorry about that :) -- Andrei Maxim http://andreimaxim.ro