How can I define the -last vowel- in a string?
For example, I have a word "classic"
I want to find that the last vowel of the word "classsic" is the letter "i", and delete that last vowel.
I'm thinking :
def vowel(str)
  result = ""
  new = str.split(" ")
  i = new.length - 1
  while i < new.length
    if new[i] == "aeiou"
      new[i].gsub(/aeiou/," ")
    elsif new[i] != "aeiou"
      i = -= 1
    end
  end
  return result
end
 
     
     
    