From: Leo Laursen Date: 2001-12-11T23:54:32+09:00 Subject: [ruby-talk:28225] Hash.keys Q Hi all I have written my first ruby program, and it was fun, but there is one litle detail i'm wondering about. The program logs on/off to my isp via a slightly modified telnet function. The options for "telnet" is a hash read from a file. File.foreach(conffile){ |l| options[$1]= $2 if l ~= /(.*):\s+(.*)/ } the conffile looks like this: Host: IP-addr. Port: portnr. Name: username Password: password Now options.keys returns ["Password", "Host", "Port", "Name"] I would expect ["Host", "Port", "Name", "Password"] is there an explanation for this ? The program is about 70 lines, so i could post it in case it is me doing something stupid. (very likely :-) ) Leo ruby -v: ruby 1.6.5 (2001-11-28) [i386-linux] -- Aphasia: Loss of speech in social scientists when asked at parties, "But of what use is your research?"