dbuckhal what about this?

w,n,d = 1,frac,0 unless 
%r{(?:(?<w>[-]?\d+)\s*)??(?<n>[-]?\d+)/(?<d>\d+)}xms =~ frac
w,n,d = w.to_i,n.to_i,d.to_i

with that you do not need the $vars

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