class Erubis::Main

def untabify(str, width=8)

def untabify(str, width=8)
  list = str.split(/\t/)
  last = list.pop
  sb = ''
  list.each do |s|
    column = (n = s.rindex(?\n)) ? s.length - n - 1 : s.length
    n = width - (column % width)
    sb << s << (' ' * n)
  end
  sb << last
  return sb
end