Replacing the vowels of a string with the letter "X"
Look into regular expressions, which Ruby is very good at:

def vowel_censor(string)
  string.gsub(/[aeiou]/i, "X") # case-insensitive
end


Or, even easier, more low-level and more efficient, use String#tr:

def vowel_censor(string)
  string.tr("aeiou", "X") # lowercase only; use "aeiouAEIOU" to handle both upper- and lowercase
end


For your current code:


The Ruby convention is 2 spaces of indentation. Not 4 spaces, not tabs
Your code doesn't handle uppercase vowels
join doesn't need an argument in this case
charachter is misspelt
Don't create a variable (result in this case) and modify it from inside a block unless you really, really have to. Do something like this instead:

sentence.chars.reduce([]) do |result, char| # reduce is also aliased as #inject
  result &lt;&lt; vowels.include?(char) ? "X" : char
end.join


or (building a string instead of an array)

sentence.chars.reduce("") do |result, char|
  result += vowels.include?(char) ? "X" : char
end


or (using a method similar to reduce)

sentence.chars.each_with_object([]) do |result, char|
  result &lt;&lt; vowels.include?(char) ? "X" : char
end.join