str = "AbcEdfGhi"
b=""
"CamelCase".split('').each{|i|
  if i.downcase!
    b += "_"
  end
  b += i
}
p b