From: ts Date: 2006-04-02T22:18:09+09:00 Subject: Re: odd number list for hash error and command line parsers in general >>>>> "T" == Talha Oktay writes: T> eval "$OPT_#{name.sub(/^-+/, {''}).gsub!(/-/, {'_'}).upcase!} =3D In your eval you have .sub(/^-+/, {''}) ^^^^ .gsub!(/-/, {'_'}) ^^^^^ ruby think that it's an hash with only one element : remove {} Now you use #gsub! which can return nil if the substitution fail moulon% ruby -e 'p "a".gsub!(/b/, "b")' nil moulon% Same for #upcase! moulon% ruby -e 'p "1".upcase!' nil moulon% Guy Decoux