title: Ruby: How do I create a stack out of user input?
body: <p>Total ruby-baby here, I'm trying to get a hang of it using <a href="http://www.codecademy.com/courses/ruby-beginner-en-mzrZ6" rel="nofollow">this</a> Codecademy Tutorial.
  Trying to understand it better I'm giving the extra questions a spin and getting stuck while trying, but I don't understand why.</p>
  
  <p>So – The program at hand is very simple: It replaces a single user-defined word within an input with the word REDACTED.
  Now: I want to expand the list of redacted words to as many as the user likes, not just one.</p>
  
  <p>Here's my attempt:</p>
  
  <pre><code>puts "Please enter your text here: "
  text = gets.chomp
  puts "Which words would you like to redact? "
  redact = gets.chomp
  
  words = text.split(" ")
  censorlist = redact.split(" ") 
  
  =begin 
  How do I build an array out of this .split to access all the words separately in my if-condition?
  =end
  
  words.each do |word|
    if word != censorlist
      print word + " "
    else 
      print "REDACTED " 
  end   
  end
  </code></pre>
  
  <p>Sorry if this is too basic to ask around here, but I've been spinning this a while and all the answers i found elsewhere don't make sense to me. i just don't know how to access the array I made with .split.
  Thank you!</p>
  
  <p>-N.</p>