Something like this should do it:
"1/50.0".gsub( /\d+\.?\d*/ ) { |num| num.to_f }

-- 
Posted via http://www.ruby-forum.com/.