>>>>> "T" == Talha Oktay <toktay / gmail.com> 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