From: Simon Krahnke Date: 2009-10-31T18:35:06+09:00 Subject: Re: file open failure test * Robert Klemme (2009-10-27) schrieb: Just to play around with ruby 1.9: > DAYS = %w{Sun Mon Tue} # ... You can construct the hash doing the opposite translation with: DAYS_TO_I = DAYS.each_with_index.inject({}) { | h, (v, i) | h[v] = i; h }.freeze Any more simple way to do that? mfg, simon .... l