"Can't convert String into Array" error!?

text = gets.chomp
puts "second time"
redact = gets.chomp
redacted_words = redact.split(" ")
words = text.split(" ")
words.each { |words|
unless (redacted_words - words).empty?
    print words + " "
    print  "Redacted "


What are you trying to do?

In your code,

redacted_words - words

is trying to subtract a string from an array of strings. This is not allowed. Here is the output you get when you try doing that (I'm using the interactive Ruby interpreter, irb)

nbk@somewhere:~/dev/Ruby/codeacademy$ irb
irb(main):001:0> my_string = "Hello"
=> "Hello"
irb(main):002:0> my_array_of_strings = ["Hello", "World", "How", "Are", "You"]
=> ["Hello", "World", "How", "Are", "You"]
irb(main):003:0> my_array_of_strings - my_string
TypeError: can't convert String into Array
	from (irb):3:in `-'
	from (irb):3
	from /usr/bin/irb:12:in `<main>'